POV-Ray : Newsgroups : povray.binaries.images : Vortex pattern : Re: Vortex pattern Server Time
24 Apr 2024 13:23:56 EDT (-0400)
  Re: Vortex pattern  
From: Bald Eagle
Date: 14 Jul 2019 15:25:02
Message: <web.5d2b81843717ac604eec112d0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> I'm going to try to apply a falloff from 1 to 0 in the y direction, and see if I
> can't code up an isosurface scene that works with that...

Right-o.
So I got the isosurface working with a pigment function, after Mike Williams'
invaluable site gave me the crucial function {} - 0.5 trick.

Then once I got the isosurface to display what was actually going on in 3D, I
realized that there was some rewriting needing to be done.  The quicky function
that I piggybacked onto BP's code resulted in a plane at y=0 that looked great,
but as my earlier attempts at displaying the 25 different patterns suggested,
and the isosurface confirmed, all was not well at y != 0.

The distance function was spherical, and IIRC, I had changed the rotated pattern
to cylindrical (y=0). That resulted in a weird sphere of rotated pattern inside
an empty cylinder, surrounded by the default pattern.

So I fixed all of that, and then had to limit the rotation to only take place in
the 0 < y < 1 region.  That made my head hurt for most of the morning.   Got
that straightened out, and then generalized it to 0 < y < Radius.

So then had to concoct some sort of way to take that little cylinder of space
and taper it so that it was full radius at y=1, and 0 radius at y = 0.

So I nested another select function inside the first, and used that to control
where there was twist, and where there wasn't.  After 6 or 8 petit mal
mathematical epileptic fits, and a trip to the laundromat (where I worked it out
in one last attempt) I got a usable equation for proof of concept.

Replacing Pattern(x,y,z).x with 0 gives me empty space where there is no twist,
thus having the isosurface model only the region where the effect is applied.

Then I reversed the outcomes to model only the default pattern with the affected
region missing, and gave that a mostly transparent pigment.

So here's what that looks like so far.

A better set of Falloff equations would be a useful toolkit for people to play
around more with this.

I think if I do 2 (4?) more isosurfaces with the .green and .blue components,
and a rgbf pigment, then maybe I can closely model the full-color pattern in 3D.
Or just do it in media with density patterns.

Anyway here's leopard scale 0.05 in a 4-unit cube with the twist effect in red.


Post a reply to this message


Attachments:
Download 'documentationfigures.png' (441 KB)

Preview of image 'documentationfigures.png'
documentationfigures.png


 

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