Log Spiral

Next
 From:  bemfarmer
6951.1 
LogSpiral script, by Brian McMillin 9/30/2014
Revision of Logarithmic2D script of 9/24/2011.
The Logarithmic Spiral is also known as the EquiAngular spiral, Bernoulli's Spiral, and Spira Mirabilis.
The spiral is the Golden Spiral when the exponent is the golden ratio φ / 2PI, about 0.306349.
A golden spiral gets wider by a factor of φ for every quarter turn it makes. (Wikipedia)
Click on "Exponent" for a golden spiral.
(Modified from Moi scripts of Michael and Gear script of Max Smirnov)
Extrude is nice. It seems to be 10% of its value.

Negative values of Whorl, Scale (180 degree rotation), and Exponent are permitted. (Seems to not be a problem.)
Reset of screen may be needed to see large spirals off screen.
Large values for Whorl may need higher Point count.
A zero value for Exponent makes a circlular form.

Added the Moi3/commands folder to my windows library to allow quick copy of scripts to the folder. (Finally)

Is there an "UnsignedNumericInput?"

What color scheme is "best" for Notepad++ ( or some other editor?)? The glaring white is not so good. Switched to style zenburn.

- Brian

EDITED: 30 Sep 2014 by BEMFARMER

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6951.2 In reply to 6951.1 
Hi Brian, re: Is there an "UnsignedNumericInput?"

Sorry, no there isn't a specific control for that particular one.

Currently in v3 there is:

<moi:TextInput> - text characters
<moi:NumericInput> - floating point number
<moi:DistanceInput> - floating point number but formatted for display using the current unit system (using feet&inches notation for example), and gets a units label after it.
<moi:IntegerInput> - integer number
<moi:UnsignedIntegerInput> - non-negative integers like for item counts
<moi:PointInput> - xyz coordinate


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
6951.3 In reply to 6951.2 
Thank you Michael.

Math.abs() takes care of negative numbers.

I'll have to search the scripts for examples of the other entry methods :-)

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Andy (ANDYT)
6951.4 
Thank you Frenchy, Bem & Karsten for your prompt replys

Karsten I am after a 2D spiral line, that I can then project down onto a beehive shape to get the 3D element

Bem your last suggestion of using the logspiral script and then sweeping an expanding tube along will work I think, I will try. The log spiral itself is a fixed ratio of expansion and only of limited use to me

Michael suggested the below, but this is beyond my expertise to do sadly -

there’s a pretty simple sine wave script here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=1519.38

You could take that script and modify the EvalSineWave function to instead evaluate your own desired function.


The other thing is a function curve graphing script here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=6447.1

Best wishes

Andy
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  bemfarmer
6951.5 
Here is a revision of the logarithmic spiral script, called logspiral4.
Notes and credits to Max and Michael are in the .js comments.
The code is nice and concise, compared to the previous version, but the sliders are a bit "flickery."
Additions, similar to the Archimedian Spirals script, include rotation direction, and start angle control.
There is no extrude.
- Brian
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All