Greetings all,
as an exercise in scripting, I've written a simple spiral tool.
Note: not a menu script.
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
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.
Regards, Myles.
New tool - spiral
Moderators: Víctor Paredes, Belgarath, slowtiger
- Lost Marble
- Site Admin
- Posts: 2347
- Joined: Tue Aug 03, 2004 6:02 pm
- Location: Scotts Valley, California, USA
- Contact:
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,
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,
Tarjei
Hi Tarjei!
It might still be worth doing, just for the Lua learning involved
Regards, Myles.
Heh!tknaps wrote:Damn you Myles! Just what I was planning to do this weekend!
It might still be worth doing, just for the Lua learning involved
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:Guess I'll have to think of something else then, or maybe peer-review/bugfix/improve yours
Post it when it's finished! The more working scripts, the better - both as tools and to help understand scripting.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
Regards, Myles.
Hi Myles!
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! )
Cheers,
Yes, I know, but it's a lot more fun to do something newmyles wrote:It might still be worth doing, just for the Lua learning involved
tknaps wrote:Guess I'll have to think of something else then, or maybe peer-review/bugfix/improve yours
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! )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 ?
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
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.myles wrote:Post it when it's finished! The more working scripts, the better - both as tools and to help understand scripting.
Cheers,
Tarjei
Nah, I'm too lazy, I just realised I can always scale the points after the spiral is drawn.tknaps wrote: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! )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 ?
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.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! )
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.