Page 1 of 1

New tool - spiral

Posted: Wed Sep 08, 2004 3:22 am
by myles
Greetings all,

as an exercise in scripting, I've written a simple spiral tool. :D
Note: not a menu script. 8)

Warning: while this works on the few tests I've done, it is not thoroughly tested or reviewed yet. Try it at your own risk :twisted:
You may wish to back up your existing _tool_list.txt file before trying this.

The files are available at :
http://www-personal.monash.edu.au/~myle ... index.html

Right-click and save all three files to your tool folder under scripts. Note: you can manually edit _tool_list.txt if you prefer.

Note for Mac users: You may possibly have to convert the line endings in the .lua and .txt files - or maybe not. Sorry, I don't have access to a Mac to test this. :oops:

Regards, Myles.

Posted: Wed Sep 08, 2004 4:20 am
by Lost Marble
Nice! Mac users - you don't have to do anything funny with line endings. Lua scripts should run un-modified on Windows and Mac.

Posted: Wed Sep 08, 2004 3:32 pm
by tknaps
Damn you Myles! Just what I was planning to do this weekend! :)

Guess I'll have to think of something else then, or maybe peer-review/bugfix/improve yours :)

I've made a lame script for creating a parallelogram (or rhombus if you like), but there's a few hitches I need to fix before making it available somewhere. Also just an excercise, so I don't know if it's useful for anyone :)

Cheers,

Posted: Thu Sep 09, 2004 12:10 am
by myles
Hi Tarjei!
tknaps wrote:Damn you Myles! Just what I was planning to do this weekend! :)
Heh! :twisted:

It might still be worth doing, just for the Lua learning involved :wink:
tknaps wrote:Guess I'll have to think of something else then, or maybe peer-review/bugfix/improve yours :)
Feel free to do all of the above - maybe a version that scales differently with the mouse movement in X and Y directions (an oval/ellipse spiral ?), controlled with an option check-box at the top of the workspace ?
tknaps wrote:I've made a lame script for creating a parallelogram (or rhombus if you like), but there's a few hitches I need to fix before making it available somewhere. Also just an excercise, so I don't know if it's useful for anyone :)
Post it when it's finished! The more working scripts, the better - both as tools and to help understand scripting.

Regards, Myles.

Posted: Thu Sep 09, 2004 9:41 am
by tknaps
Hi Myles!
myles wrote:It might still be worth doing, just for the Lua learning involved :wink:
Yes, I know, but it's a lot more fun to do something new :)
tknaps wrote:Guess I'll have to think of something else then, or maybe peer-review/bugfix/improve yours :)
myles wrote:Feel free to do all of the above - maybe a version that scales differently with the mouse movement in X and Y directions (an oval/ellipse spiral ?), controlled with an option check-box at the top of the workspace ?
Yes, that's an idea. Shouldn't be too much of a hassle (I'm sure you're going to run off and implement his yourself now! :D)

I also thought of a checkbox for automatically animating the spiral layer to make classic "psychedelic spiral" animations, and maybe also adding noise to it. Will need to stare a bit more at the API first though, I wish we had function arguments listed... (hint, hint LM! ;))
tknaps wrote:I've made a lame script for creating a parallelogram (or rhombus if you like), but there's a few hitches I need to fix before making it available somewhere. Also just an excercise, so I don't know if it's useful for anyone :)
myles wrote:Post it when it's finished! The more working scripts, the better - both as tools and to help understand scripting.
Indeed, will do. I'll set up anonymous ftp or something from my home machine which is (mostly) up 24/7, at least until we hopefully can get a common script repository set up.

Cheers,

Posted: Fri Sep 10, 2004 1:10 am
by myles
tknaps wrote:
myles wrote:Feel free to do all of the above - maybe a version that scales differently with the mouse movement in X and Y directions (an oval/ellipse spiral ?), controlled with an option check-box at the top of the workspace ?
Yes, that's an idea. Shouldn't be too much of a hassle (I'm sure you're going to run off and implement his yourself now! :D)
Nah, I'm too lazy, I just realised I can always scale the points after the spiral is drawn. :)
tknaps wrote:I also thought of a checkbox for automatically animating the spiral layer to make classic "psychedelic spiral" animations, and maybe also adding noise to it. Will need to stare a bit more at the API first though, I wish we had function arguments listed... (hint, hint LM! ;))
Just guessing without looking at it, but you might be able to extract the details and guess the arguments for much of this from the Rotate tool code.

Hmm, you can always animate the rotation later, using the normal tools.

A better project might be to make a multi-arm spiral - so you can have multi-coloured fills - maybe a text-box for choosing the number of arms ?
Maybe auto-weld the center points, and create and weld a multi-point circle around the outer points ?

Now that is a tool I could use - if you don't feel like trying that or don't get a chance in the next couple of weeks, I'll try implementing that one.

Regards, Myles - spiralling downward into madness.