POV-Ray : Newsgroups : povray.pov4.discussion.general : 3D warp repeat for primitives : Re: 3D warp repeat for primitives Server Time13 Sep 2024 13:47:25 EDT (-0400)
 Re: 3D warp repeat for primitives
 From: Bald Eagle Date: 7 Aug 2024 16:00:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.66b3d207c952a06952b3ee0425979125%40news.povray.org",
"headline": "Re: 3D warp repeat for primitives",
"dateCreated": "2024-08-07T20:00:00+00:00",
"datePublished": "2024-08-07T20:00:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
"Kenneth" <kdw### [at] gmailcom> wrote:
> I'm a bit confused as to what the final result should be, or what it should look
> like when applied(?) to your two infinite planes.

Any of our current pigment patterns are procedurally generated, meaning that
they return some value given only the <x, y, z> coordinates as input.
What that essentially means is that there is actually no "pattern" that globally
exists as a monolithic pre-made thing, but simply a method for determining what
is at any given point in space when actually evaluated by the raytracer.

> (I'm actually not sure what
> those planes are for.)

The planes would be the limits of the 3D space evaluated for applying the warp
repeat - kinda like an infinite bounding box of a certain thickness.
A "thick plane".

> For endlessly repeating a textured 3D object (like a sphere) *as* 3D objects, a
> simple or nested #for-loop construct would be the easy solution, with each
> sphere offset of course; no 'repeat warp' necessary.

No sir.  I cannot do #for (i, 0, inf)
And I'd have to know _where_ to place all of those 3D objects ahead of time.

What I'm talking about is truly infinite.
Just like our current procedural patterns.

> But I sense that you're
> seeking something different or more complex...possibly involving an 'object
> pattern' use?

Yes, like I mentioned before, it would be "as though" one used the object
pattern, but this would be implemented rather differently to make it simpler.

So, picture I have the unit cube.  I can place 8 spheres in the unit cube "in
the corners" each tangent to 3 sides and 3 other spheres.
I our usual scenes, I could give these spheres a rich pallete of colors,
patterns, normals, finishes, etc.
What I'm simply envisioning is having that unit cell get substituted into ANY
unit cell encompassed by the repeat warp parameters.
So if I repeated it in the x and z directions, I would get a "plane" of that
unit cell containing those 8 spheres anywhere I looked - wherever the camera was
placed, and however far away from the origin I chose.
I could animate the camera position and keep going and going and going, and
there would truly be an infinite number of spheres. (Naturally constrained to
the abilities of the computer to store and represent the <x, y, z> coordinates)

It's that same effect as making an isosurface using <mod (x, 1), y, mod(z,1)>,
but it would be handled much more efficiently vis source, _and it would carry
all of the material properties with it_.
So it would be thousands of times faster and probably tens of thousands of times
less tedious to implement.

> I've also been working for months on various schemes to tesselate a typical
> pre-made POV-ray object (to eventually turn it directly into an .stl file for
> 3-D printing). I've solved *some* of the problems, but the overall solution
> still eludes me :-\  I haven't given up though!

"tesselate" --- More details please!  ;)

- BW
```