PDA

View Full Version : mathematics... der...


DB Hansen
03-07-2008, 08:53 PM
I love the way LW stretches my left brain, geometrically speaking, but I still have a hard time grasping the trig and calc stuff. I've been messing with sprials as of late, creating them using some of the methods suggested, (tuts, etc.), but I'm currently after an equiangular or logarithmic spiral, ala fibonacci. How would I plot this in modeler as a spline? Can I use the Plot1D tool? 2D? Do I use parametric or cartesian math?

I've at least managed to track down the correct formula via standard notation, as follows:

Parametric: {E^(t Cot[alpha]) Cos[t], E^(t Cot[alpha]) Sin[t]}
Cartesian: x^2 + y^2 == E^(ArcTan[y/x] Cot[alpha] )

but I need help translating this into LW. The best I've come up with is:

x^2 + y^2 = exp^(atan2*cot(30))

but doesn't seem work.

Any ideas? Bueller?

thankee!
DB

JeffrySG
03-07-2008, 09:44 PM
Something "d o o econonomics...."


(sorry, couldn't resist) :)

Mark The Great
03-08-2008, 09:33 PM
Ah, I'll make a guess. Perhaps you should separate your variables. Try solving for y.

markschum
03-08-2008, 10:57 PM
x^2 + y^2 = exp^(atan2*cot(30))
y = sqrt(exp^(atan2*cot(30)) - x^2)

:bangwall:

rakker16mm
03-08-2008, 11:04 PM
Can I use the Plot1D tool? 2D? Do I use parametric or cartesian math?



I was trying use the plot 2D tool for the same sort of thing, and not having much luck with it. So I used a drawing program instead, and then imported the shape using the EPSF loader. My result although not mathematically correct was "Good'nuf-fer-Gumment-Werk"

DB Hansen
03-09-2008, 08:41 PM
hah, i totally "cheated" too. Illustrator has a sweet little tool that draws these babies with its eyes closed. EPSF loader, bada boom bada bing.

But my geeky side is still curious, Markschum, which tool would work best for those numbers? Best I could get with them was a grid (but a good one).

rakker16mm
03-09-2008, 10:30 PM
Ah one of these days dig through relativity in layout and see what I can do with it. At least it seems a little more math friendly and there are working examples of Dr. This or Dr. That to pick apart for inspiration, and then use motion path extrude in modeler... Still it would be nice to have a library of formal curves and spirals to use in the same way we use primitives.

but in the mean time I have some far less interesting tasks that need to get done first.

markschum
03-09-2008, 10:56 PM
But my geeky side is still curious, Markschum, which tool would work best for those numbers? Best I could get with them was a grid (but a good one).


I have no idea . If I had to do it I would probably try a spreadsheet and write a quick script to plot points and then create a curve .

markschum
03-10-2008, 12:47 AM
ok, I did some digging and got this , wich may be helpful

ang = angle of point around center
b is a scale factor which is user defined
a is the sin of camming angle of the curve , the greater angle tighter curve
a = 0.25 gives a nice starting point
e is a constant equal to 2.718

Radius = b * e^(a*ang)
x = R * cos(ang)
y = R * sin(ang)

I will have a script shortly that will draw a curve in modeller .

markschum
03-10-2008, 01:03 AM
For what its worth here is a script that generates the spiral , there are some values that can be customised, I have tried to comment those .

A interface would be really nice if anyone wants to add one .

rename the file from spiral.ls.txt to spiral.ls or give it a better name .

meshpig
03-10-2008, 02:58 AM
I dropped math before grasping trig at school but recently thought that was then and this is now kind of thing.

One question if you will; -x^2 + y^2 = exp^(atan2*cot(30)) ... what is "exp^" ?

Is that what describes the vector as it radiates outward? As in the pictorial sense when you hand-draw/estimate by eye the golden section and for each magnification the spiral grows exponentially according to the golden mean?

m:help:

markschum
03-10-2008, 10:20 AM
This is a bit beyond my maths too but this is the link I mostly used

http://www.bigwalls.net/climb/camf/index.html

its a discussion of making cams . E is given as the natural logarithm which meant nothing much to me but they did give a value for it . There is an exp function in Lightwave but I wasnt sure of it so I did it manually.

A lot of the discussions of the spirals just left ne saying ... Duh !

It should be possible to get an equation that can be plugged into Layouts expression editor , there was a maths one that looked promising . I dont normally use layout though, I mainly just stick with modeller .

:goodluck:

ps. I found this about e ... http://en.wikipedia.org/wiki/Natural_logarithm .. so read it and then you'll know ;)

meshpig
03-11-2008, 06:01 AM
x^2 + y^2 = exp^(atan2*cot(30))

but doesn't seem work.

Any ideas? Bueller?

thankee!
DB


At least - x^2 + y^2 = exp^(atan2*cot(30)) is just a circle. ie. you may as well write x^2 + y^2 = 1 ( or a circle of unit radius).

m

meshpig
03-12-2008, 12:04 AM
This is a bit beyond my maths too but this is the link I mostly used

http://www.bigwalls.net/climb/camf/index.html

its a discussion of making cams . E is given as the natural logarithm which meant nothing much to me but they did give a value for it . There is an exp function in Lightwave but I wasnt sure of it so I did it manually.

A lot of the discussions of the spirals just left ne saying ... Duh !

It should be possible to get an equation that can be plugged into Layouts expression editor , there was a maths one that looked promising . I dont normally use layout though, I mainly just stick with modeller .

:goodluck:

ps. I found this about e ... http://en.wikipedia.org/wiki/Natural_logarithm .. so read it and then you'll know ;)


OK, but your spiral script works perfectly? You'd hardly need to do more than send it to layout as a curve.

Yeah, that link is what I meant by generating the spiral via the golden mean...

55676

55677

and the "exp^" is the "exponential function". We'll all get there eventually.

m:)