The Interactive Geometry Software Cinderella

Forum: Cinderella Support (E)

Forums->Cinderella Support (E)->An urgent question about variables

jlanier
2 stars
An urgent question about variables


Hi,
I'm preparing for a presentation and it would make things much more clear if I could define some complex numbers as special values. In particular, instead of writing ((-1+i*3^.5)/2) each time, I'd like to just be able to type in w.
Likewise for u=((5+(-7)^.5)/2)^(1/3)
and v=((5-(-7)^.5)/2)^(1/3)
How can I define these variables so that whenever I create a function through Add Function, I can use these in my transformations, so that I could just type x*w rather than x*((-1+i*3^.5)/2)?
I've tried defining them using the Define a Function command, but I don't know if I'm entering the script properly. If if define w as ((-1+i*3^.5)/2) and then Define a Function as 5*w, the program evaluates this correctly, but when I try to use it through the transformation menu, it won't work.
Help!
Justin

 
on: Tue 06 of May, 2008 [22:14 UTC] reads: 117331

Posted messages

author message
Aw: An urgent question about variables
on: Wed 07 of May, 2008 [07:22 UTC]
Justin,

this is easy if you use the Script Editor (you find it in the "File" menu or using Ctrl-9 on Windows or CMD-9 on the Mac). You will find an "Initialization" section in the Events tree. Click it and then enter your variable definitions in the text area on the right. Then these will be available whenever you use a script and you do not have to care about the order of execution of the scripts.

I made a video of this, available at http://cinderella.de/files/Initialize.mov (3.5 MB, Quicktime)

Ulli




Show posts:
 
Language