sorry to bother anyone but i'm i'm looking for some help with the following...
Perhaps trivial and pointless but i'm looking to simluate a harmonograph
So far i've been using the source from here. Which is great and i can get a couple of pendulums going and have (in a very crude fashion, i am a total noob, then plotting some pretty pictures).
So, excuse the braindump..
currently have a 2D one going but i have very little control over the begining state of the pendulums, gravity, friction, all that kind of thing. I can see how i would implement the addition two pendulums that would simulate the moving drawing plane (two more pendulums with Push/Pop to modulate the two driving pendulums).
I'm going to start what i hope will be a generic pendulum class that I can understand a little better and i'd really like some means of setting the initial conditions (angle, say absolute west is 0, east is 180, and length/period) in the source or ideally enter text into a form (with sanitizing) and hit a START button.
Essentially i have two questions:
I'd like some pointers on the maths of a generic pendulum class, please. Pretty please :)
Is there a way i can run my "pretty picture" harmonograph along the lines of:
preva = a.loc.x+450;
prevp = p.loc.x+150;
without screwing up the rendering of the pendulums (i'd really like to keep the pendulums on-screen but if a remove the background re-draw they all get mashed up in the exact opposite of the way that i want to path the pendulums describe not to, if that makes sense) please excuse the above code, it's entirely prototype to push the line drawing away fron the origin of the pendulums.
So, generic pendulum class and can i do some kind of viewport thing where i refresh the viewport somewhere and DON'T somewhere else, IYKWIM.
help greatly appreciated, massive noob but keen to participate.