POV-Ray : Newsgroups : povray.general : Finding locus of intersection : Re: Finding locus of intersection Server Time
5 May 2024 13:21:04 EDT (-0400)
  Re: Finding locus of intersection  
From: Bald Eagle
Date: 17 Aug 2013 16:50:01
Message: <web.520fe1bfd12344092c424ebe0@news.povray.org>
> POV-Ray does not use any iterative approaches for finding surfaces (*).
> Instead, it uses a bunch of straightforward formulae to compute the
> intersection points between a line (light ray) and any of the geometric
> primitives it supports. That's all it does in (1).

Would I be wrong to then think that if:
Instance A = POV-Ray calculating where a ray hits Sphere 1, and
Instance B = POV-Ray calculating where a ray hits Sphere 2,
then there ought to be a way
to add / subtract / solve a simultaneous equation for both instances to find out
where they coincide?

I mean without knowing the details of the guts of the POV-Ray source code, I'm
just working by analogy, and looking at the output of the render engine.
At the intersection, there ought to be some ... detectable change.  Like the
minima and maxima of a curve, or an inflection point, or a discontinuity, or the
myriad of other computable equation properties.

> If the primitive is a member of a CSG intersection ... POV-Ray then uses another
bunch of straightforward formulae to

> check whether the points it has found are inside all the other
> primitives participating in the CSG intersection; any point that isn't
> must be part of a surface section that was intersected away.

This does nothing to dissuade me from thinking there has to be a way to
capitalize on how POV-Ray finds and checks all those points.


> One simple approach to greatly reduce the number of points to test would
> be binary subdivision: Presuming A is inside and B is outside, test a
> point C exactly halfway between; if C is inside, let A'=C, otherwise let
> B'=C. Repeat until you're ok with the precision.

Well, yes.  I was also thinking about doing some other sort of thing like the
"squeeze" theorem, where I look for a limit.


You and I can SEE where the intersection of 2 spheres is.  It's a bloody obvious
and sudden change from one convex surface to another.  It just seems that if
height_field has water_level, then the "low" point between the two spheres ought
to be detectable.  Maybe something about the sudden change of slope or normal to
the surface or ... something.

BTW, 2 ellipses was just an example.  Apparently it's a wicked hairy problem to
solve, and things like matrices and numerical methods were suggested to find the
intersection.


Post a reply to this message

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