POV-Ray : Newsgroups : povray.advanced-users : Math help needed please. Server Time
30 Jul 2024 18:15:31 EDT (-0400)
  Math help needed please. (Message 31 to 40 of 40)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Steve
Subject: Re: Math help needed please.
Date: 22 Apr 1999 09:33:42
Message: <371F17F2.58153A54@puzzlecraft.com>
http://www.geom.umn.edu/docs/reference/CRC-formulas/node26.html

Section 7.3 Additional Properties of Ellipses

This information is kinda condensed but it contains the illustrated answer to your
problem. You may want
to visit the section on conic basics to get warmed up.

Consider a triangle where 1 vertex is the center of the ellipse C, 1 vertex is a focus
of the ellipse F
and the 3rd vertex is point P on the circumference of the ellipse.  These are derived
from a listed
equation.

The natural motion for an ellipse is to sweep equal area with equal time. The tutorial
does not show
this, but that's Kepler's 3rd Law of Planetary Motion.

Start with line C-P to be at right angle to line C-F. Point P is where the ellipse
touches the floor.
Line C-P is the distance from the center to the floor. Rotate the ellipse by a given
amount, say 5
degrees, in time T. This changes the angle of line CP by 5 degrees over time period T.
This also moves P
to point P2. Use the polar formula to find the length of C-P2 and calculate the area
of the triangle
P-P2-C. The second movement will involve calculating the distance P2-P3 from the area
of the triangle.
The area stays the same for equal time units. This also gives you the linear movement
across the floor,
which is also cyclic.

Another way to locate P2 is to rotate the ellipse by 5 degrees over time T. This tilts
line C-P as well
as line C-F 5 degrees in relation to the floor. Use a triangle with vertex F1, vertex
F2 and vertex P,
which is perpendicular to the line F1-C-F2. The angle of coincidence equals the angle
of reflection, so
changing the angle of F1-P also changes the angle of F2-P by the same amount. Use your
regular trig to
locate the new point P2 so that the angle of coincidence remains equal to the angle of
reflectance with
the floor. The length C-P tells you how far the center is from the floor and tilting
the angle of the
line C-P to perpindicular will give you the translation amount parallel to the floor.

All of the equations used are derived from 1 master equation that describes all
conics. The circle is
just a special case of the ellipse, so if you wanted to get really cute you could have
a sphere morphing
into an ellipse while rolling across the floor.

I'm busy on a programming project but I'd sure enjoy working this out. I am now
convinced it will work
for all possible conics.

steve


Post a reply to this message

From: Josh English
Subject: Re: Math help needed please.
Date: 22 Apr 1999 12:24:25
Message: <371F3EEC.1DF566CE@spiritone.com>
Thanks, Steve. Luckily I found a method of rolling the scaled sphere, which does make
an ellipse, around
the origin. What I need now is a method for finding the length of an arc on an
ellipse. I've found
equations, but they don'tmake much sense to me. I'm still working on it, though. The
arc length is the
last thing I need to finish the problem.

I wonder if Andrew Cocker has the solution as is simply testing me : ) I know I'll be
making a tutorial
about this one!

Josh

Steve wrote:

> Josh, let me locate some stuff on the web for you. The tangent to any point of any
conic cross section
> is pretty standard stuff. In Jean Texareau's "How To Make A Telescope" he describes
the whole thing in
> geometrical terms, so you might feel right at home. The math is differential
calculus but it is
> accompanied with very clear illustrations of the various geometries of the conics
and all their
> properties. You can simply examine the drawings and pick the equations you need. No
need to learn
> calculus - you already know how to solve an equation. Spherics, hyperbolics,
parabolics and elliptics
> are all covered. Also, the book is intended to be a primer for the amateur telescope
maker so the
> presentation is easy to understand.
>
> I'm vacationing at the lake house or I'd just grab my copy and give you the answer.
I'll be home in
> about a month if the web search doesn't turn up the info.
>
> I really believe that conics holds the key to a generalized solution to your very
interesting problem!
> Once the equations are set up, you should be able to roll any conic cross section
across the floor by
> altering a couple of variables. We do something very similar to this when testing
and figuring a
> mirror. We measure the intersection of the conic and the light path which yields the
slope, then
> calculate which conic we have. The slope is defined as being the intersection point
of a plane that is
> perpendicular to the surface of the conic at that point. The ratio of the changing
slopes gives us a
> scaling effect, is the ellipsoid size 1 or size 2? You can probably use this to keep
the ellipse in
> constant, perfect contact with the ground plane because you'll know exactly what
size the ellipse is
> and what it's slope is at every point.
>
> The math also includes calculating the difference between a conic and a spheric, but
I don't think you
> can achieve true conics simply by scaling a sphere.
>
> I'll get back to ya on this.
>
> steve
>
> Josh English wrote:
>
> > this seems more complicated to me, but I never studied optics, I just tutor high
school algebra and
> > geometry. I suppose if you could find the proper intersection of plane and cone
and find a way to
> > rotate it appropriately, it would work. I'm still stuck on finding a tangent to
the ellipse at any
> > given point on the edge of the ellipse.
> > I also haven't heard from Andrew in this thread, so I wonder if he has a solution
or not
> >
> > Josh English
> >
> > Steve wrote:
> >
> > > I don't have the solutions, but I have an impression that the trig approach is a
bit contrived.
> > >
> > > Perhaps you should be looking for a more generalized method.
> > >
> > > The sphere is is a conic cross section (angle 90) formed by revolution. It's
perfectly described
> > > by the math for conics. Size is derived by locating the cross section along the
vertical axis.
> > > Using this seems fairly simple, plus it would also solve the problem of rolling
ellipsoids along
> > > the floor. Instead of scaling, use the location of the cross section to derive
the size.
> > >
> > > A generalized solution of this type would further yield parabolic and hyperbolic
movements.
> > >
> > > Just an idea from my old optics days.
> > >
> > > steve


Post a reply to this message

From: Margus Ramst
Subject: Re: Math help needed please.
Date: 22 Apr 1999 17:08:57
Message: <371f81d9.0@news.povray.org>
Josh English wrote in message <371F3EEC.1DF566CE@spiritone.com>...
>Thanks, Steve. Luckily I found a method of rolling the scaled sphere, which
does make an ellipse, around
>the origin. What I need now is a method for finding the length of an arc on
an ellipse. I've found
>equations, but they don'tmake much sense to me. I'm still working on it,
though. The arc length is the
>last thing I need to finish the problem.
>


Why do you need the length af an arc? The tangency point problem was the
only one I had. If you've solved that, the circumference formula gives the
forward motion along the ellipse. If you look at my anim, you can see that
there is no "gliding", the ellipsoid rolls correctly.

Margus


Post a reply to this message

From: Andrew Cocker
Subject: Re: Math help needed please.
Date: 22 Apr 1999 18:48:10
Message: <371f991a.0@news.povray.org>
Steve <ste### [at] puzzlecraftcom> wrote in message
news:371F17F2.58153A54@puzzlecraft.com...
>
<snip>

>The circle is
> just a special case of the ellipse, so if you wanted to get really cute you could
have a
sphere morphing
> into an ellipse while rolling across the floor.

The above describes precisely what I wanted to be able to do. Keep up the good work
fellas.


BTW, I don't understand a word of what you're talking about ;-)

Andy


Post a reply to this message

From: Andrew Cocker
Subject: Re: Math help needed please.
Date: 22 Apr 1999 18:48:12
Message: <371f991c.0@news.povray.org>
Josh English <eng### [at] spiritonecom> wrote in message
news:371F3EEC.1DF566CE@spiritone.com...

<snip>
> I wonder if Andrew Cocker has the solution as is simply testing me : )

LOL ;-) No way. Anything beyond simple rotates/translates and I reach for my copy of
Colefax's AutoClck.mcr. I've forgotten most of the mathematics I learnt at school, and
thinking through problems such as this turns my brain to mush in about 5 seconds flat.

I think that when this problem is solved, offering the ability to roll any ellipse (
even
a morphing one ), an extremely usefull macro could be constructed.

Thanks Josh and Steve for your efforts.

Andrew


Post a reply to this message

From: Josh English
Subject: Re: Math help needed please.
Date: 22 Apr 1999 20:24:07
Message: <371FAF60.B865323@spiritone.com>
I was looking in .animations, not .binaries.animation, so I didn't see your post
until today. (silly me, forgot that group was there).

But I did have an epiphany. I was trying to figure out the arc length when a
ratio of the circumference to 360 degrees compared to the ratio of x to current
angle should give me the proper distance. I'm checking that now but it works.
The only thing I haven't tested is changing the size of the sphere in the middle
of the animation

here is my code:

#version 3.1;

#include "colors.inc"

global_settings { assumed_gamma 1.0 }

// ----------------------------------------


sky_sphere { pigment { gradient y
                       color_map { [0.0 color blue 0.6]
                       [1.0 color rgb 1] } } }

light_source { <0,0,0> color rgb 1
               translate <-30, 30, -30>
              }

// ----------------------------------------
// clock goes from 0 to 1
#declare anim_clock = clock;

#declare x_scale = 0.25;
#declare y_scale = 1;

#declare rotation = anim_clock * 180;   // only animate one half rotation for a
looping anim
#declare roff = 90;

#declare centerX = cos(radians(rotation-roff))*x_scale;
#declare centerY = sin(radians(rotation-roff))*y_scale;
#declare p = <centerX,centerY,0>;

#declare circumference = 2*pi*sqrt(( pow(x_scale,2) + pow(y_scale,2) ) / 2 );
#declare half = circumference / 2;
#declare quarter = circumference / 4;

#declare f1 = sqrt( abs ( pow(x_scale,2) - pow(y_scale,2) ) );
#declare f2 = -f1;

#declare foci1 = <0,f1,0>-p;
#declare foci2 = <0,f2,0>-p;

#declare a1 = degrees ( atan2 ( foci1.x,foci1.y));
#declare a2 = degrees ( atan2 ( foci2.x,foci2.y));
#declare a3 = ( a1 + a2 )/2;

// translate across x axis
#declare translation = circumference *rotation/360;


plane { y, 0 pigment { checker scale quarter } }

sphere { <0,0,0> 1
         pigment { radial frequency 8 rotate 90*x}
         scale <x_scale,y_scale,0.125>
         translate -p
         rotate a3*z
         translate translation*x
         }

camera { location  <translation, y_scale, -3.5>
         angle 65
         right     4/3*x
         look_at   <translation, y_scale,  0.0>
         //orthographic
        }

Margus Ramst wrote:

> Josh English wrote in message <371F3EEC.1DF566CE@spiritone.com>...
> >Thanks, Steve. Luckily I found a method of rolling the scaled sphere, which
> does make an ellipse, around
> >the origin. What I need now is a method for finding the length of an arc on
> an ellipse. I've found
> >equations, but they don'tmake much sense to me. I'm still working on it,
> though. The arc length is the
> >last thing I need to finish the problem.
> >
>
> Why do you need the length af an arc? The tangency point problem was the
> only one I had. If you've solved that, the circumference formula gives the
> forward motion along the ellipse. If you look at my anim, you can see that
> there is no "gliding", the ellipsoid rolls correctly.
>
> Margus


Post a reply to this message

From: Steve
Subject: Re: Math help needed please.
Date: 22 Apr 1999 23:30:20
Message: <371FDC2B.A769151@puzzlecraft.com>
Josh,

Check out the bottom of the conics web page. The equation for rotating diagonals
indirectly yields the
value you are seeking. The path that point P follows and the path length are what you
need for this
approach.

However, you can get the same information by calculating the path that the Center
point follows and it's
length. The equations for this are given directly.

If this hasn't been answered clearly by the time I get back home, I'll look it up in
Texareau's book and
post the equations.

steve

Josh English wrote:

> Thanks, Steve. Luckily I found a method of rolling the scaled sphere, which does
make an ellipse, around
> the origin. What I need now is a method for finding the length of an arc on an
ellipse. I've found
> equations, but they don'tmake much sense to me. I'm still working on it, though. The
arc length is the
> last thing I need to finish the problem.
>
> I wonder if Andrew Cocker has the solution as is simply testing me : ) I know I'll
be making a tutorial
> about this one!
>
> Josh
>
> Steve wrote:
>
> > Josh, let me locate some stuff on the web for you. The tangent to any point of any
conic cross section
> > is pretty standard stuff. In Jean Texareau's "How To Make A Telescope" he
describes the whole thing in
> > geometrical terms, so you might feel right at home. The math is differential
calculus but it is
> > accompanied with very clear illustrations of the various geometries of the conics
and all their
> > properties. You can simply examine the drawings and pick the equations you need.
No need to learn
> > calculus - you already know how to solve an equation. Spherics, hyperbolics,
parabolics and elliptics
> > are all covered. Also, the book is intended to be a primer for the amateur
telescope maker so the
> > presentation is easy to understand.
> >
> > I'm vacationing at the lake house or I'd just grab my copy and give you the
answer. I'll be home in
> > about a month if the web search doesn't turn up the info.
> >
> > I really believe that conics holds the key to a generalized solution to your very
interesting problem!
> > Once the equations are set up, you should be able to roll any conic cross section
across the floor by
> > altering a couple of variables. We do something very similar to this when testing
and figuring a
> > mirror. We measure the intersection of the conic and the light path which yields
the slope, then
> > calculate which conic we have. The slope is defined as being the intersection
point of a plane that is
> > perpendicular to the surface of the conic at that point. The ratio of the changing
slopes gives us a
> > scaling effect, is the ellipsoid size 1 or size 2? You can probably use this to
keep the ellipse in
> > constant, perfect contact with the ground plane because you'll know exactly what
size the ellipse is
> > and what it's slope is at every point.
> >
> > The math also includes calculating the difference between a conic and a spheric,
but I don't think you
> > can achieve true conics simply by scaling a sphere.
> >
> > I'll get back to ya on this.
> >
> > steve
> >
> > Josh English wrote:
> >
> > > this seems more complicated to me, but I never studied optics, I just tutor high
school algebra and
> > > geometry. I suppose if you could find the proper intersection of plane and cone
and find a way to
> > > rotate it appropriately, it would work. I'm still stuck on finding a tangent to
the ellipse at any
> > > given point on the edge of the ellipse.
> > > I also haven't heard from Andrew in this thread, so I wonder if he has a
solution or not
> > >
> > > Josh English
> > >
> > > Steve wrote:
> > >
> > > > I don't have the solutions, but I have an impression that the trig approach is
a bit contrived.
> > > >
> > > > Perhaps you should be looking for a more generalized method.
> > > >
> > > > The sphere is is a conic cross section (angle 90) formed by revolution. It's
perfectly described
> > > > by the math for conics. Size is derived by locating the cross section along
the vertical axis.
> > > > Using this seems fairly simple, plus it would also solve the problem of
rolling ellipsoids along
> > > > the floor. Instead of scaling, use the location of the cross section to derive
the size.
> > > >
> > > > A generalized solution of this type would further yield parabolic and
hyperbolic movements.
> > > >
> > > > Just an idea from my old optics days.
> > > >
> > > > steve


Post a reply to this message

From: Andrew Cocker
Subject: Re: Math help needed please.
Date: 23 Apr 1999 14:07:30
Message: <3720a8d2.0@news.povray.org>
Hi Josh,

    Thanks for your help. I rendered the code you posted, and it's almost perfect,
however
the ellipse seems to slide backwards a little, half way through the rotation.
    Sorry for being critical ;-)



----------------------
Andy
------------------------------------------------------------------------------------------
-
--The Home Of Lunaland--
--visit my POV-Ray gallery--
--listen to my music--
www.acocker.freeserve.co.uk


Post a reply to this message

From: Josh English
Subject: Re: Math help needed please.
Date: 23 Apr 1999 20:00:56
Message: <3720FB73.29BE83C3@spiritone.com>
I'm not seeing it go backwards at all, it does not move by very much but it rotates by
a large
amount when the small ends are touching the ground. It' accurate movement, tho. Very
strange

Josh

Andrew Cocker wrote:

> Hi Josh,
>
>     Thanks for your help. I rendered the code you posted, and it's almost perfect,
however
> the ellipse seems to slide backwards a little, half way through the rotation.
>     Sorry for being critical ;-)
>
> ----------------------
> Andy
>
------------------------------------------------------------------------------------------
> -
> --The Home Of Lunaland--
> --visit my POV-Ray gallery--
> --listen to my music--
> www.acocker.freeserve.co.uk


Post a reply to this message

From: Andrew Cocker
Subject: Re: Math help needed please.
Date: 23 Apr 1999 21:14:25
Message: <37210ce1.0@news.povray.org>
Josh English <eng### [at] spiritonecom> wrote in message
news:3720FB73.29BE83C3@spiritone.com...
> I'm not seeing it go backwards at all, it does not move by very much but it rotates
by a
large
> amount when the small ends are touching the ground. It' accurate movement, tho. Very
strange

I rendered the code you posted, which had a side-on view, and it's definitely
happening .
Having seen the movie you posted from a different angle, it's much less noticeable,
although I can still see it.

all the best,

----------------------
Andy
------------------------------------------------------------------------------------------
-
--The Home Of Lunaland--
--visit my POV-Ray gallery--
--listen to my music--
www.acocker.freeserve.co.uk


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.