## =^..^= LC and the "graphic-mathematical power"!

Want to move your code and projects to LiveCode but don't know where to start?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller

Mariasole
Posts: 218
Joined: Tue May 07, 2013 9:38 pm

### =^..^= LC and the "graphic-mathematical power"!

Hello!
Everywhere I speak and diffuse LiveCode (and LC server! Course! ).
But a friend of mine laughed about LC and its "graphic-mathematical power" and challenged me .
I have been able to respond to some (eg, Bezier curves, etc.) for other I do not know!
For example, he says that LC can not play this algorithm.

http://mathematica.stackexchange.com/qu ... /2360#2360

He says that this is the perfect test, since it is mathematics, graphics and physics!

He told me: "the algorithm is already written, you just have to copy." And then: "AH AH AH AH AH AH AH!!!!!!".

Can anyone help me? Is it possible to reproduce this algorithm in LC?

Grazie e baci!!!

Mariasole
=^..^=
No input, no output. Man - Joe Strummer
Garbage in, garbage out (GIGO) - anonymous

Mark
Livecode Opensource Backer
Posts: 5138
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

### Re: =^..^= LC and the "graphic-mathematical power"!

Hi Mariasole,

It is possible. The only problem is positioning the words correctly. Probably, smart use of the intersect function in LiveCode may make this easier than in Mathematica (Just make sure that all rects of the words overlap by 2 pixels and you can quickly find the intersecting coordinates and figure out which one is closest to the center. Compare that coordinate with the center top, center bottom, center left and center right coordinates of the cloud as a whole to determine where to position the next word.

Ask your friend to use Mathematica to make an arcade game that keeps high scores in a sqlite database and uploads the scores to a server that also uses Mathematica scripts to store the same scores in a MySQL database and display them in a dynamic website and ask him to use Mathematica to compile the game for Windows, Linux, Mac OS X, Android and iOS.

One should just use the right tools for every job. Sometimes it is Mathematica, sometimes LiveCode, often something completely different.

Kind regards,

Mark
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Mariasole
Posts: 218
Joined: Tue May 07, 2013 9:38 pm

### Re: =^..^= LC and the "graphic-mathematical power"!

Thanks Mark!
Then I start to work! I want to win the challenge!
Mark wrote:Probably, smart use of the intersect function in LiveCode may make this easier than in Mathematica (Just make sure that all rects of the words overlap by 2 pixels and you can quickly find the intersecting coordinates and figure out which one is closest to the center. Compare that coordinate with the center top, center bottom, center left and center right coordinates of the cloud as a whole to determine where to position the next word.
Could you advise me an example stack (or a simple tutorial) of the "intersect function"? I do not know where to start!

I'm sorry if I'm taking advantage of your kindness. Do not feel obligated to help me!

Thank you again!
Mariasole
=^..^=
No input, no output. Man - Joe Strummer
Garbage in, garbage out (GIGO) - anonymous

FourthWorld
VIP Livecode Opensource Backer
Posts: 6840
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

### Re: =^..^= LC and the "graphic-mathematical power"!

Mariasole, while not exactly the same as the Mathematica example, the stack downloadable in the LiveCode newsletter article on making a tag cloud may help you get started:
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com

Mariasole
Posts: 218
Joined: Tue May 07, 2013 9:38 pm

### Re: =^..^= LC and the "graphic-mathematical power"!

Thank you Richard!
You are very kind and patient with me!
I saw the stack and is a good base to work! Thank you very much.
I am writing with delay because I'm going from Windows XP to Linux and I'm no expert ( ).
Obviously I have already installed the LC!
Now I will have to study twice, namely LC and LC Server Linux!
Thank you Richard, and congratulations for your new role as Community Manager!

Long live the LiveCode!
Long live the Community Manager!

Baci e in bocca al lupo!
=^..^= Mariasole
No input, no output. Man - Joe Strummer
Garbage in, garbage out (GIGO) - anonymous

FourthWorld
VIP Livecode Opensource Backer
Posts: 6840
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

### Re: =^..^= LC and the "graphic-mathematical power"!

Mariasole wrote:Thank you Richard, and congratulations for your new role as Community Manager!
Well, being volunteer position perhaps condolences may be the better word. But thank you just the same.

I've been impressed by RunRev's commitment to open source process, and I see a lot of good stuff happening down the road.

As you dive deeper into Linux, you'll no doubt be using bash now and then - if you're not already a shell scripting expert you may find this helpful:
http://tldp.org/LDP/Bash-Beginners-Guid ... index.html
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com

Mariasole
Posts: 218
Joined: Tue May 07, 2013 9:38 pm

### Re: =^..^= LC and the "graphic-mathematical power"!

Thank you Richard!!!!
SMACK!!!

=^..^=
Mariasole
No input, no output. Man - Joe Strummer
Garbage in, garbage out (GIGO) - anonymous