POV-Ray : Newsgroups : povray.programming : advice for a wannabe : Re: advice for a wannabe Server Time
16 Apr 2024 04:23:51 EDT (-0400)
  Re: advice for a wannabe  
From: Anton Sherwood
Date: 26 Feb 2009 20:30:40
Message: <49a74240$1@news.povray.org>
> Anton Sherwood <bro### [at] poboxcom> wrote:
>> I have a project in mind that involves tracing rays in non-Euclidean
>> space.  Obviously it would be good if I could adapt Povray, [...]

clipka wrote:
 > Most important for you, I guess, are the very basics of the
 > geometry stuff, while things like texturing, media etc. might
 > be of minor importance.

You guess accurately.

I don't know if there's an efficient way to make hyperbolic patterns 
whose scale is consistent.

 > [...] I guess for non-Euclidean geometry you'll need to change
 > POV's concept of a "point" (which obviously is currently just a
 > straightforward Euclidean 3D location vector) and a "ray" (which
 > currently is a combination of a point and a 3D direction vector),
 > the algorithms to compute ray-shape intersections and perform
 > and inside-tests. Neither of these seem too easy to me.

The fundamentals are surprisingly easy-- once I found a book that covers 
them at all!  (Most books I've seen on !E don't stoop to anything so 
grubby as coordinates.)  For positively-curved (spherical) space it's 
fairly obvious, use one extra dimension and normalize; for 
negatively-curved (hyperbolic) space, it's essentially the same, except 
that the extra coordinate is imaginary and the squared magnitude of a 
point is -1 rather than +1.  I'd have to change the vector structure in 
a lot of places, but that's drudgery rather than a concept problem.

Distance between points is easy: if 'u' is their dot-product, the 
distance in spherical space is acos(u) and in in hyperbolic space it's 
acosh(-u).  This leads to a simple expression for spheres.  I don't yet 
know how to efficiently measure distance from a general line (and thus 
how to determine whether a ray intersects a cylinder), but have faith 
that I can work that out as I go along.

Here's something I made, a pattern on the hyperbolic plane: 
http://ogre.nu/doodle/#chainmail
The second picture below that is analogous to what I hope to do in 
curved 3-space.

-- 
Anton Sherwood, www.ogre.nu
"How'd ya like to climb this high without no mountain?"--Porky Pine


Post a reply to this message

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