POV-Ray : Newsgroups : povray.general : Wrap Grid Around Stuff : Re: Wrap Grid Around Stuff Server Time
24 Apr 2024 21:46:14 EDT (-0400)
  Re: Wrap Grid Around Stuff  
From: Bald Eagle
Date: 15 Jul 2018 08:25:00
Message: <web.5b4b3c3fef60e5b1458c7afe0@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

http://news.povray.org/povray.general/thread/%3Cweb.441831a9134eb929e606030f0%40news.povray.org%3E/

> I did some function based pigment thing too a long while back, but don't
> quite remember details - and I cannot find it.
>
> Mike's solution simpler - if it works for for seventy goats ;-).
>
> Bill P.

Yes, that would be along the lines of situation (a) where he could just define a
grid as a layered texture in space and have the object "in" it.

What I'm envisioning / speculating / projecting his question is: if he had a
grid composed of loose lines - like the unwoven warp and weft of a loom, then if
he placed a ball on the surface of that grid, then as the object slipped between
the cords, they would move to allow the passage of the object through a hole
that got stretched out of the way.

I think simplistically, if a repeating linear texture like wood were applied to
the plane, and then a black hole warp were added with a strength proportional to
the proximity of the object to the plane, then that might do it.   Then just
layer the same texture rotate y*90.

Style points for scaling the black hole warp in x and z according the cross
sectional dimensions of the object's bounding box.

I tried the complicated pattern function method, and just got a blank black
render.  I think pattern just returns 1 or 0 ?   So I suppose I'd have to use
that as a multiplier function rather than the base function.

It would be helpful to know how the actual black hole warp is implemented as a
pattern modifier - more info to dig up.  :)

If a 3D grid is needed, perhaps there's a way to do something based on
electrostatic repulsion, and have the grid be constructed from an array of
points that are use to build splines / sphere sweeps.

I tried to use the mod() repeating trick of Mike Williams and then use the
non-linear scaling trick to "bend" the cylinders away from a point on the plane,
but sometimes it takes a while for me to "get" the math and have enough clarity
to implement it sanely and effectively.   ;)

Along THOSE lines, near the origin where x < 1, I figured that would give me
math problems / rendering artifacts, so I used max(r, x) [where r is some
arbitrary radius of a sphere]  Then in the function, I translate that portion of
the cylinder by using a prototype function x - (x-(max(r,x)) so that after tit
hits the radius of the object, the translation drops to zero.
That has to modified to get rid of the suddenness of the drop, and make it
dependent upon z as well, to make it curve, instead of just translating the
whole cylinder away from the point.


Post a reply to this message

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