You are invited to Log in or Register a free Frihost Account!

The Maths of a curve. Calling all real Mathematicians!

I am designing an animation program for my website to upgrade from the last one but I lack deep readily understandable Maths knowledge. The requirement has come about because of the improved abilites of the modern browser.

Because the old program had limitations all that was needed was calculation involving trigonometrics.
Any animated sprite would travel linearly between two points while others travelled the shorter distances but in the same time frame.

Curves could be emulated, but in reality these were made up of many tiny straight lines.

The new program will have to accurately display a 3 dimensional view. A good example would be a cut down version of the solar system displayed in a browser. With all the planets going along their respective paths (Venus going the other way!-Don't you just hate that theres always one!)

The "planets" appear closer and further away and are obscured by closer "bodies". The difficult part is defining a software interface that provides entry for the parameters which would define the "bent" elipse of each planet's orbit.

The interface should be generic so that you could also use it for the moons going round the planets.

The whole interface should by default create straight lines.
Note that these lines are optionally not visible and are instead used to create a route for an animated sprite?

Your ideas would be interesting. Any suggestions on how to reword this subject entry would also be appreciated.
Hmmm... where does the mathematician come in? I would like to help you but it sounds more like you need a software engineer instead. I know little about programming past basic web designing (html, php, mysql) and am lost in how to design a program like that...
I am a software engineer looking for various formulae. Crying or Very sad
chasbeen wrote:
I am a software engineer looking for various formulae. :cry:

Well... you mentioned that "Curves could be emulated, but in reality these were made up of many tiny straight lines." That's pretty much the way to do it. That's actually the way that it's done in calculus. An arc length is determined by adding up the distance of an infinite amount of straight lines.

But that's probably not what you want. You wanted planetary movements? That would involve finding the circumference of an ellipse. That's a little problematic because to do that, it involves integration, and I'm not sure if that's possible in software programming. A good approximation, though, would be (assume ellipse is in form x^2/a^2 + y^2/a^2 = 1):

I got that image from wikipedia because I thought it would be easier to do that than to type all that up....
Let me just say
I am nowhere near implementation of these advanced features
but I do not think they are impossible. This dialog has given me some ideas and I appreciate your unput.
However, I have thought a bit more about a method of generating significant curved lines for drawing or as paths for animated sprites.

I went to wikipedia and typed in "bezier curves" (I'm already aquainted because of work I have done in vector graphics). In there exists some good animation which shows how an interface could be made (no doubt they exist already) to produce a "good looking" curve for whatever you wanted.

You see the interface must be generic so that you could use it for anything from a straight line to an elipse (Anything beyond that would have to be a composite)

Anyone still interested or anything to add (Corrections etc)?

Look at the section on "quadratic" curves and "higher order" curves.
Related topics
Reply to topic    Frihost Forum Index -> Science -> Basics

© 2005-2011 Frihost, forums powered by phpBB.