POV-Ray : Newsgroups : povray.advanced-users : Some math aid required... Server Time
29 Jul 2024 02:30:51 EDT (-0400)
  Some math aid required... (Message 21 to 24 of 24)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Christopher James Huff
Subject: Re: Some math aid required...
Date: 11 Feb 2004 08:33:53
Message: <cjameshuff-1E9AC1.08341411022004@news.povray.org>
In article <402### [at] hotmailcom>,
 andrel <a_l### [at] hotmailcom> wrote:

> Are you sure? I have used this myself and when I used it
> the tangents were correct. Note also the symmetries in the
> coefficient, the binomial coeeficients and the nice alternating
> signs. I think the original error may be in the line:
>  > P2*3*(2*(1 - t)*(-1)*t + (1 - t)2) -
> In my deriviation the final '-' is a '+'. BTW, I derived the
> equations in the same way as you did. Well, of course, we both
> have the same sort of math training I suspect :).

The one at the very end? That was in the original equation:
P1*(1 - t)^3 +
P2*3*(1 - t)^2*t -
P3*3*t^2*(1 - t) +
P4*t^3

If that's wrong, than the original equation is too. If you're talking 
about something in that term, the Maxima result is: 3*P2*(1 - t)^2 - 
6*P2*(1 - t)*t
=
3*P2*((1 - t)^2 - 2*(1 - t)*t)
=
3*P2*(-2*(1 - t)*t + (1 - t)^2)

Which agrees with my result.
As for training, I'm currently slogging my way through Calculus II, and 
am mainly self-taught. I'm still mainly teaching myself, due to the fact 
that the instructor can't speak clear English or write legibly. I'm also 
taking Numeric Analysis, which may cover splines later this semester.


>  > My results look right, any errors are small ones.
>  >
> What equations did you use in the end?

a():=0.1; b():=0.9; c():=0.2; d():=1;
(Defined as functions because I couldn't figure out how to define them 
as variables in Maxima...damned annoying program, with practically 
useless documentation.)

f(t):=a()*(1 - t)^3 + b()*3*(1 - t)^2*t - c()*3*t^2*(1 - t) + d()*t^3;

fd(t):=3*(b() - a() + (a() - 2*b() - c())*2*t + (b()*3 + c()*3 + d() - 
a())*t^2);

tgt(t, p):= (t - p)*fd(p) + f(p);

plot2d([f(t), tgt(t, 0.2), tgt(t, 0.5), tgt(t, 0.9)], [t, 0, 1]);

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: andrel
Subject: Re: Some math aid required...
Date: 11 Feb 2004 09:19:40
Message: <402A39BB.7010809@hotmail.com>
Christopher James Huff wrote:
> In article <402### [at] hotmailcom>,
>  andrel <a_l### [at] hotmailcom> wrote:
> 
> 
>>Are you sure? I have used this myself and when I used it
>>the tangents were correct. Note also the symmetries in the
>>coefficient, the binomial coeeficients and the nice alternating
>>signs. I think the original error may be in the line:
>> > P2*3*(2*(1 - t)*(-1)*t + (1 - t)2) -
>>In my deriviation the final '-' is a '+'. BTW, I derived the
>>equations in the same way as you did. Well, of course, we both
>>have the same sort of math training I suspect :).
> 
> 
> The one at the very end? That was in the original equation:
> P1*(1 - t)^3 +
> P2*3*(1 - t)^2*t -
> P3*3*t^2*(1 - t) +
> P4*t^3
> 
> If that's wrong, than the original equation is too. 
Sorry, I did not check all your equations, I should have.
You are absolutely right here, your original equation
is wrong. There should not be a minus there either ;)

> If you're talking 
> about something in that term, the Maxima result is: 
I had never heard of Maxima, just googled it.
Perhaps I give it a try someday.
off-topic: Mostly I do the math required for POV by hand.
For years I did not do as much math as I do now. Sometimes
I even try to convince people that POV is an interesting
kind of application for learning math at a highschool level.
You often want to achieve some goal and the only way to do
it is sit down and do the equations. Along the same line,
if someone asked me why that should learn math at highschool
one of my answers is: to be able to create realworld
objects in POV!
	Andrel


Post a reply to this message

From: Christopher James Huff
Subject: Re: Some math aid required...
Date: 11 Feb 2004 11:48:18
Message: <cjameshuff-576C46.11483911022004@news.povray.org>
In article <402### [at] hotmailcom>,
 andrel <a_l### [at] hotmailcom> wrote:

> > If that's wrong, than the original equation is too. 
> Sorry, I did not check all your equations, I should have.
> You are absolutely right here, your original equation
> is wrong. There should not be a minus there either ;)

Well, that would explain why my equation works for finding tangents to 
it, but yours doesn't. Thought it looked odd...


> off-topic: Mostly I do the math required for POV by hand.

Mostly I program the computer to do it for me. I'm terrible at that kind 
of thing, always making arithmetic errors and simple little stuff like 
that...at least it wasn't me this time.


> For years I did not do as much math as I do now. Sometimes
> I even try to convince people that POV is an interesting
> kind of application for learning math at a highschool level.
> You often want to achieve some goal and the only way to do
> it is sit down and do the equations. Along the same line,
> if someone asked me why that should learn math at highschool
> one of my answers is: to be able to create realworld
> objects in POV!

It is a very good way of learning how the math applies to and relates to 
the real world, or at least approximations of it.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Some math aid required...
Date: 11 Feb 2004 12:59:20
Message: <402a6d78@news.povray.org>
Tim Nikias v2.0 wrote:
> so, I've got the following formula to calculate Bezier-Splines:
...
> Anyways, I need to calculate the direction/tangent of the spline at any
> given position.
...

I suggest that you go googling for "Frenet Frames"

Look for web pages similar to this norwegian one:

http://tinyurl.com/27xap


Tor Olav


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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