Nicely done! Doing that by hand would take utmost patience and hand control. Epicycloids and hypocycloids cannot be far behind! Luckily at Chaco, they could not shake to erase.
FWIW, I added a wrapper to the alternative straight line algorithm in edited post #12.
This is an awesome thread. A beautiful mix of clean, theoretical math/geometry with a healthy dose of reality (EAS friction, backlash etc) thrown in to keep everyone (OK, Gareth) honest. Nothing is ever as simple as it seems. As someone said previously, "everything works in a simulation".
Unfortunately the Sun Dagger has been shaken and erased. The stones have settled & shifted (likely due to erosion caused by visitor traffic) and no longer cast the correct light patterns, and has been off-limits to park visitors since the 1980's. What a pity. It functioned perfectly for a thousand years until it was "rediscovered" in 1977 and then ruined within a single decade. At least it was studied and thoroughly documented. It lives on in an interactive digital exhibit in an Albuquerque museum. I wish they would put that model online. It is still a mystery how the Anasazi built it.
The last time I held an Etch A Sketch in my hands could easily be 45 years ago.
That toy has won a lot of praise, even awards, for being a brilliant toy.
But, as a kid at the time, whilst being fascinated by it's operation, I wrote it off as being essentially useless.
OK drawing verical and horizontal lines is great and all but anything else was better done with a pencil and paper. I thought it was basically a stupid idea.
Little did I realize that a few years later I could have automated it with a 8 bit computer and basically had a plotter on the cheap before anyone else. What an imagination failure.
The idea of a Pocket Etch A Sketch is amazing in itself. I mean, as if one would have a desperate urge to draw some vertical or horizontal lines whilst on the move.
Seems they had some Etch A Sketches with LCD later in the day, gack.
Over here in metric land I had never heard of Tau until very recently. Although my young mind had rebelled at Pi for reasons it did not quite understand.
This guy cleverly used a full-sized EAS as a data logger for temperature. Using a frosty Guiness for a "cold" reference makes me appreciate it even more.
@Heater: You're right. On a bicycle tour through the UK, I stayed at http://theoldbarninnglooston.com/. Didn't know a soul there, but at the end of the evening, I was everyone's chum in the pub downstairs. They liked that I was cycling through and running the London marathon later that week. Bartender "Charles at the bar" was the coolest guy around and kept the Guinness flowing. He showed me his specialized tap that the Guiness company had to actually install there. And yes, it was temperature regulated, because there is such thing as "too cold".
JUST TO BrinG tHe Blog back on track (tsktsk to falling down water adverts)
Spirals.....I got spirals.. and things I cant describe ....yet
Main blog has been updated above...
How about meeting of the toys, etch-a-sketch as spirograph?
Two frequencies, like the lissajous curves above, but with sine and cosine components combined as follows. Amplitudes A and B, frequencies Fa and Fb. Simple spirograph patterns with A:B and Fa:Fb as ratios of small integers. Keep A+B constant to maintain a constant overall size.
epicycloids
y = A * sin(2 * pi * Fa * t) + B * sin(2 * pi *Fb * t)
x = A * cos(2 * pi * Fa * t) + B * cos(2 * pi *Fb * t)
or
hypocycloids
y = A * sin(2 * pi * Fa * t) + B * cos(2 * pi * Fb * t)
x = A * cos(2 * pi * Fa * t) + B * sin(2 * pi *Fb * t)
In terms of Erco's robot arm from post #14, two links and two pivots, epipcycles have the links rotating in the same direction at two different rates, while hypocycloids have the links rotating in opposite directions. Why trouble with a straight line?
How about meeting of the toys, etch-a-sketch as spirograph?
The good news is your code works much better (way faster) than mine sooo i am migrating to your method.
Below are some direct LCD plots from your code using various sin cos pi values and joining the dots.
This goes to show how easy it is to create "tool path" stepper motor data for not only for EAS or SG.
I am in the process of shoehorning your method to suit my stepper controls.....then i cant wait to try out those formulars.
Erco, speaking as a translator "it's all English," but did you cheque and wonder about the programme catalogue, i.e. behaviour of the centre colour flavour of the labour tyre appearing plotte?
This is a very "Grey" - (EU) or should i say "Gray" - USA .... area ...... seems in Europe there is also the ultimate blue print "Queens English" and the close partner "Business English"
Once again lets get this blog on track again........
Need to get my display - sin-cos-radians-pi in order to attempt Tracy's epicycloids and hypocycloids.
First Etappe (Fr) is to plot simple circle (yes i know i have done it on countless occasions .... so here it is in code for reference)
AcircleSize := 50
repeat circumference from -180 to 180 step 5 ' Integer PI step values
fx := f32.FFloat( circumference ) ' convert integer circumference to FloatingPoint
fAcircleSize := f32.FFloat(AcircleSize) ' convert integer circle to FloatingPoint circle
fy := fx ' duplicate value for Cos bit
fx := f32.FMul( f32.sin( f32.Radians(fx)),fAcircleSize ) ' calculate Sin(fx in Radians)* circle size
fy := f32.FMul( f32.cos( f32.Radians(fy)),fAcircleSize ) ' calculate Cos(fy in Radians)* circle size
x0:=f32.FTrunc(fx) ' Convert back to an integer
y0:=f32.FTrunc(fy)
gr.plot(x0+100,y0+100) ' position point on screen
gr.copy(display_base) ' Transfer bitmap to Visual screen
By my reckoning i need just two of these routines and interplot one circle onto the other taking into account the size, frequency, phase of each cycloid part.
y = A * sin(2 * pi * Fa * t) + B * sin(2 * pi *Fb * t)
I am assuming that the "t" is the phase of the signal .hmmmm!!!!
That's the theory.....
Very good. The designs where you present complete SPIN code are particularly useful. For the next step: Do you have a 3D printer to attach to this and print out some of the more interesting figures? You could probably make a slinky or Magician's Rings but it would be more interesting to see some of the multidimensional Tesseracts that could perhaps represent spacial corridors in a multidimensional universe with techniques of overprinting and assembly.
No i do not have one but i would need one like yesterday already......
I see your point with the 3D printing........ i have seen wheels with this "tweel" or honeycomb like design.... maybe it worth one of 3D printer Paralaxians trying this out.
Looking good!
I am assuming that the "t" is the phase of the signal .hmmmm!!!!
That's the theory.....
t is for time, and the whole (2*pi*F*t) is the instantaneous phase. There is no intrinsic time element in the curves. You can turn the gears on a Spirograph as fast or slow as you want. The time element comes in more with say an oscilloscope display or dynamical system like a compound pendulum. In a discrete time system t is the step you use to draw out the function as a dotted line. The more steps you use, the smoother the curve.
You are right, is better to look at it as a pair of phase accumulators. At each time step, oscillator A accumulates angle Ωa and oscillator B accumulates angle Ωb.
repeat
y := A * sin(Ωa) + B * sin(Ωb)
x := A * cos(Ωa) + B * cos(Ωb)
plotToYX
Ωa += deltaΩa ' two angular frequencies.
Ωb += deltaΩb ' ratio Ωa/Ωb, and A/B determine shape
The CORDIC rotation algorithm does exactly that, or the phase accumulator can be sized for lookup in the ROM sine table. The smaller the increment values, the truer and smoother the curve.
First stab at the code .....a bit OTT but it appears to be ...almost working...(however i am not getting a dot2dot continous line - it plots one point an then the next point is 180° on the other side if you know what i mean - could be a floating point miss_understanding by me)
I did this a while back, though with a bigger Etch-a-Sketch. That might have actually made it easier to control. I set up the motor control code to deal with backlash and got semi-decent curves out of it. It's possible that the bigger unit makes this easier (or the bigger screen makes the lash less visible).
You can actually see the backlash compensation fairly well in the first video - when the gears change direction, they slow down first, then there's a little pop of speed to take up the lash, then they ramp back up again. It's a fun hack to play with.
I think you could use this to design a stellar performance engine simulation with on paper with results that show a space time nozzle with particular shapes to control flow. Any other current ideas for use?
I did this a while back, though with a bigger Etch-a-Sketch.
I like it.... I have already ordered a larger one from the UK it was not an easy job to track it down.
I am not to worried about the speed with the mini one i have, however i will need to upgrade the steppers for the larger one i guess.
Its neat to see your code and in many areas its simular to yours (even down to the stepper motor outputs !!)
The back lash code i have not installed yet, the line routines are higher priority......the EAS is anyhow only a quick output devise to test software.
The smiley and spanner video at first reminded me of Jaimie Mantze logo ......
Comments
All that friction/backlash - perhaps the mechanics of the E-a-Sketch need upgrading... Is that possible? (fear they are welded/glued shut)
FWIW, I added a wrapper to the alternative straight line algorithm in edited post #12.
x(t) = a sin(ωt + δ)
y(t) = b sin(t)
This is an awesome thread. A beautiful mix of clean, theoretical math/geometry with a healthy dose of reality (EAS friction, backlash etc) thrown in to keep everyone (OK, Gareth) honest. Nothing is ever as simple as it seems. As someone said previously, "everything works in a simulation".
Unfortunately the Sun Dagger has been shaken and erased. The stones have settled & shifted (likely due to erosion caused by visitor traffic) and no longer cast the correct light patterns, and has been off-limits to park visitors since the 1980's. What a pity. It functioned perfectly for a thousand years until it was "rediscovered" in 1977 and then ruined within a single decade. At least it was studied and thoroughly documented. It lives on in an interactive digital exhibit in an Albuquerque museum. I wish they would put that model online. It is still a mystery how the Anasazi built it.
http://accad.osu.edu/~aprice/works/sundagger/index.html
The last time I held an Etch A Sketch in my hands could easily be 45 years ago.
That toy has won a lot of praise, even awards, for being a brilliant toy.
But, as a kid at the time, whilst being fascinated by it's operation, I wrote it off as being essentially useless.
OK drawing verical and horizontal lines is great and all but anything else was better done with a pencil and paper. I thought it was basically a stupid idea.
Little did I realize that a few years later I could have automated it with a 8 bit computer and basically had a plotter on the cheap before anyone else. What an imagination failure.
The idea of a Pocket Etch A Sketch is amazing in itself. I mean, as if one would have a desperate urge to draw some vertical or horizontal lines whilst on the move.
Seems they had some Etch A Sketches with LCD later in the day, gack.
Over here in metric land I had never heard of Tau until very recently. Although my young mind had rebelled at Pi for reasons it did not quite understand.
There is no mention of metric in that Tau link.
http://ijprojects.blogspot.com/2012/06/etch-sketch-turned-temperature-data.html
I love it.
But Guiness should never be "frosty".
Something like 55-63 F is quite OK.
Like any real beer, or anything actually, the colder it gets the less it smells and tastes.
Why spend your money on flavour if you are going to waste it? Might as well suck another Bud.
Spirals.....I got spirals.. and things I cant describe ....yet
Main blog has been updated above...
Two frequencies, like the lissajous curves above, but with sine and cosine components combined as follows. Amplitudes A and B, frequencies Fa and Fb. Simple spirograph patterns with A:B and Fa:Fb as ratios of small integers. Keep A+B constant to maintain a constant overall size.
epicycloids
y = A * sin(2 * pi * Fa * t) + B * sin(2 * pi *Fb * t)
x = A * cos(2 * pi * Fa * t) + B * cos(2 * pi *Fb * t)
or
hypocycloids
y = A * sin(2 * pi * Fa * t) + B * cos(2 * pi * Fb * t)
x = A * cos(2 * pi * Fa * t) + B * sin(2 * pi *Fb * t)
In terms of Erco's robot arm from post #14, two links and two pivots, epipcycles have the links rotating in the same direction at two different rates, while hypocycloids have the links rotating in opposite directions. Why trouble with a straight line?
The good news is your code works much better (way faster) than mine sooo i am migrating to your method.
Below are some direct LCD plots from your code using various sin cos pi values and joining the dots.
This goes to show how easy it is to create "tool path" stepper motor data for not only for EAS or SG.
I am in the process of shoehorning your method to suit my stepper controls.....then i cant wait to try out those formulars.
Gareth: Don't you mean "maths", as you Brits are wont to say?
http://en.wikipedia.org/wiki/American_and_British_English_spelling_differences
Once again lets get this blog on track again........
Need to get my display - sin-cos-radians-pi in order to attempt Tracy's epicycloids and hypocycloids.
First Etappe (Fr) is to plot simple circle (yes i know i have done it on countless occasions .... so here it is in code for reference)
By my reckoning i need just two of these routines and interplot one circle onto the other taking into account the size, frequency, phase of each cycloid part.
y = A * sin(2 * pi * Fa * t) + B * sin(2 * pi *Fb * t)
I am assuming that the "t" is the phase of the signal .hmmmm!!!!
That's the theory.....
I see your point with the 3D printing........ i have seen wheels with this "tweel" or honeycomb like design.... maybe it worth one of 3D printer Paralaxians trying this out.
I am assuming that the "t" is the phase of the signal .hmmmm!!!!
That's the theory.....
t is for time, and the whole (2*pi*F*t) is the instantaneous phase. There is no intrinsic time element in the curves. You can turn the gears on a Spirograph as fast or slow as you want. The time element comes in more with say an oscilloscope display or dynamical system like a compound pendulum. In a discrete time system t is the step you use to draw out the function as a dotted line. The more steps you use, the smoother the curve.
You are right, is better to look at it as a pair of phase accumulators. At each time step, oscillator A accumulates angle Ωa and oscillator B accumulates angle Ωb. The CORDIC rotation algorithm does exactly that, or the phase accumulator can be sized for lookup in the ROM sine table. The smaller the increment values, the truer and smoother the curve.
fy1 := f32.FMul(fA,F32.sin(F32.radians(fOmegaA)))
fy2 := f32.FMul(fB,F32.sin(F32.radians(fOmegaB)))
Means that i can use the "Line Code" to fill in the spaces between the dots .... YAY another hurdle over....
Revised code :-
And Etch-A-Sketch Epicycloids using Line stepper code :-
You can actually see the backlash compensation fairly well in the first video - when the gears change direction, they slow down first, then there's a little pop of speed to take up the lash, then they ramp back up again. It's a fun hack to play with.
[video=youtube_share;8omfh-s9EPA]
[video=youtube_share;-MNqW1GT4nc]
I like it.... I have already ordered a larger one from the UK it was not an easy job to track it down.
I am not to worried about the speed with the mini one i have, however i will need to upgrade the steppers for the larger one i guess.
Its neat to see your code and in many areas its simular to yours (even down to the stepper motor outputs !!)
The back lash code i have not installed yet, the line routines are higher priority......the EAS is anyhow only a quick output devise to test software.
The smiley and spanner video at first reminded me of Jaimie Mantze logo ......