|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I don't really expect to get a useful answer, but here goes anyway ...
I have a project in mind that involves tracing rays in non-Euclidean
space. Obviously it would be good if I could adapt Povray, but the code
is largely opaque to me. In the (seeming) absence of a guide saying
"this is how Povray's source code is structured and here's what you need
to do to make the most common kinds of changes," can anyone suggest some
books that might bring me up to speed? Or is there no substitute for
working long years on large C++ projects?
--
Anton Sherwood, www.ogre.nu
"How'd ya like to climb this high without no mountain?"--Porky Pine
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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, but the code
> is largely opaque to me. In the (seeming) absence of a guide saying
> "this is how Povray's source code is structured and here's what you need
> to do to make the most common kinds of changes," can anyone suggest some
> books that might bring me up to speed? Or is there no substitute for
> working long years on large C++ projects?
I'd say there is no substitute for exploring the code of the particular project
you're embarking to mess with...
First thing you may want to know is whether your idea is feasible with POV at
all. To answer this question you probably need to have an understanding of the
basic principle of POV operation.
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.
POV basically uses two essential operations n geometry: Computing all "points"
where a "ray" intersects a "shape", and testing whether a "point" is inside a
"shape".
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), and the algorithms to compute ray-shape intersections and
perform inside-tests. Neither of these seem too easy to me.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> 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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I think chapter 5 in the MegaPOV documentation is a good starting point.
http://megapov.inetart.net/manual-1.2.1/megapov0121.html#internals
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|