POV-Ray : Newsgroups : povray.general : Just musing about a pattern function... : Re: Just musing about a pattern function... Server Time: 26 Jun 2019 10:25:55 GMT
  Re: Just musing about a pattern function...  
From: Le Forgeron
Date: 12 Mar 2019 18:16:01
Le 11/03/2019 à 01:25, Bald Eagle a écrit :
> So, I was wondering if it were possible to define a pattern that depends on if
> the surface of one object is coincident with another.
> 
> object A, Object B, and an overlapping surface.
> 
> I was thinking about it initially from the perspective of ease-of-use in
> highlighting imperfections in CSG / math,
> 
> pigment {overlap {_textureA, _textureB, _textureOverlap}}
> 
> but then it occurred to me that if this were possible, then
> 
> pigment {overlap {_textureA, _textureB, _textureB}}
> 
> would take care of a lot of coincident surface problems.
> 
> 
> 
> Just brainstorming and wondered if this might spark some ideas.
> 
> 

what would be the difference with the object pattern applied with B, on A ?

object{ A texture{ pigment{ object { B PigmentOut PigmentIn } } }

or/and vice versa.

Unless you want something like:

union{
object {A}
object {B}
texture { pigment { overlap { A B PigmentA PigmentB PigmentAB } } }
}

from coding point of view, the intersection would refer one of the
object, and the point would need to be tested against the other for
insideness to choose which alternative to take (A or AB when A is hit, B
or AB when B is hit)

Can it be extended to more than two objects ?

Can the syntax be different and easier ?

would a proximity-like pattern be more precise ? (similar to object
pattern, but with a tolerance radius to detect the other shape)
(beware, proximity costs a hell to compute, even if this version could
short-cut as soon as a point is found inside the shape)

Normal texture on one shape, overlap texture on the other shape but
referencing the first shape.


Post a reply to this message

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