POV-Ray : Newsgroups : povray.binaries.images : Path with sphere attached. . . : Re: Path with sphere attached. . . Server Time
17 Aug 2024 14:16:55 EDT (-0400)
  Re: Path with sphere attached. . .  
From: Anton Sherwood
Date: 25 Oct 2001 02:34:35
Message: <3BD7B3F7.EF09F96D@pobox.com>
"Arie L. Stavchansky" wrote:

> Seriously Tor, thanks for the efforts, but can you help a guy
> who was educated in Design understand what RegulaFalsi is? 
> What does it mean to solve something "numerically"?

To abandon the search for a symbolic expression like "pi-ln(3)" and
settle for "well, it's between 2.0429 and 2.0430"; to try a rough
solution, see how far off it is, adjust proportionately and try again.

There are several versions of `adjust proportionately', applicable to
different kinds of problems.  In this case I'd use the secant method
(which is similar to regula falsi). 

Start with
	x0 = the lowest reasonable value of x (zero?)
	x1 = the highest reasonable value of x (r1?)
Do this repeatedly:
	q0 = x0 - (r1 + (R - x0)/(R * r1)) * sin(atan(x0/p(x0))
	q1 = x1 - (r1 + (R - x1)/(R * r1)) * sin(atan(x1/p(x1))
	x2 = x1 - (x1-x0)*q1/(q1-q0)	//the fun bit
	x0 = x1; x1 = x2
until abs(q1) is small enough.

The line I've marked as "the fun bit" amounts to imagining that <x0,q0>
and <x1,q1> are plotted on a graph, drawing a line through them and
marking where it crosses the axis.  If q is well-behaved, the
crossing-point (x2) is a better guess than x0 or x1, so throw away the
oldest guess (x0).


-- 
Anton Sherwood


Post a reply to this message

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