POV-Ray : Newsgroups : povray.general : Self-intersecting torus : Re: Self-intersecting torus Server Time
31 Jul 2024 18:20:12 EDT (-0400)
  Re: Self-intersecting torus  
From: "Jérôme M. Berger"
Date: 22 Oct 2006 17:25:05
Message: <453be1b1$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> John VanSickle wrote:

>>>
>>>> John VanSickle wrote:
>>>>
>>>>> Jellby wrote:
>>>>>
>>>>>>  #declare X=Rmin*sqrt(1-Rmaj*Rmaj/(Rmin*Rmin));
>>>>> Why not X=sqrt(Rmin*Rmin-Rmaj*Rmaj) ?
>>>>     Because Jellby's version gives more precision? ;)
>>> Well, it probably doesn't, but thanks for trying!
>>>
> 	Actually, it does! (Although I'll admit, only in some very specific
> and unusual cases)
> 
	BTW, it is even better to write:
#declare X=Rmin*sqrt(1-(Rmaj/Rmin)*(Rmaj/Rmin));

	This avoids a potential overflow if Rmin*Rmin is too large to be
represented with a double on the used machine...

		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeb### [at] freefr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeb### [at] jabberfr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFO+Gwd0kWM4JG3k8RAj6HAJ4lf+HW/evvbA6iyij90u0T0WY99QCfYSON
9dDt0F3FSMXP563R3frvydc=
=uhLT
-----END PGP SIGNATURE-----


Post a reply to this message

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