POV-Ray : Newsgroups : povray.beta-test.binaries : Function / pattern issues. New f_labsweep. Server Time
24 Apr 2024 00:39:26 EDT (-0400)
  Function / pattern issues. New f_labsweep. (Message 1 to 4 of 4)  
From: William F Pokorny
Subject: Function / pattern issues. New f_labsweep.
Date: 26 Apr 2020 07:37:41
Message: <5ea57285$1@news.povray.org>
<---------------------- References. Five previous posts

http://news.povray.org/povray.beta-test.binaries/thread/%3C5e90564c%40news.povray.org%3E/

and

http://news.povray.org/povray.beta-test.binaries/thread/%3C5e9cce19%40news.povray.org%3E/

---
Many years ago Tor Olav Kristensen posted a method to create sphere 
capped cone isosurfaces from point a to point b. I've extracted the 
point to point linear sweep embedded in his approach to create a 
function called f_labsweep(), linear a b sweep with the idea of sweeping 
much more than spheres.

It is called once for x,y and z. For example:

#declare ptA = <0,-0.4,0>;
#declare ptB = <0,+0.4,0>;
#declare R = 0.45;

#declare Ax = ptA.x;
#declare Ay = ptA.y;
#declare Az = ptA.z;
#declare Bx = ptB.x;
#declare By = ptB.y;
#declare Bz = ptB.z;

#declare Fn00 = function (x,y,z,r,ax,ay,az,bx,by,bz) {
     f_cone(
         f_labsweep(x,y,z,0,ax,ay,az,bx,by,bz),
         f_labsweep(x,y,z,1,ax,ay,az,bx,by,bz)/1.5,
         f_labsweep(x,y,z,2,ax,ay,az,bx,by,bz),
         r)
}

-------------
// Parameters: x, y, z
// Seven extra parameter required:
// 1. If 0, return new x.
//    If 1, return new y.
//    If 2, return new z.
// 2. 3D point A x value.
// 3. 3D point A y value.
// 4. 3D point A x value.
// 5. 3D point B x value.
// 6. 3D point B y value.
// 7. 3D point B x value.
// Note. This does a linear sweep of a function about the origin
// from point A to point B returning only the modified x, y
// or z value. This enables us to code either directly on the function
// about origin call, which can see modifiers. Or, we can code up each
// as its own X,Y or X function to which we can apply pattern modifiers.
// In testing the former simpler to code, less flexible and slower. The
// latter, approach more difficult to code, more flexible and about 20%
// faster when using the same modifiers for the same result.

Attaching a few images using the new function (f_cone is new too) along 
with other pattern/function updates previously posted to this newsgroup.

Oh, the upper right images uses 'inverse' which is a new pattern wave 
modifier which works both for the traditional 0-1 pattern interval and 
the new -1 to 1 function_interval.

Bill P.


Post a reply to this message


Attachments:
Download 'story_f_labsweep.png' (385 KB)

Preview of image 'story_f_labsweep.png'
story_f_labsweep.png


 

From: William F Pokorny
Subject: Re: Function / pattern issues. New f_labsweep.
Date: 27 Apr 2020 05:31:54
Message: <5ea6a68a$1@news.povray.org>
On 4/26/20 7:37 AM, William F Pokorny wrote:
...
> 
> Attaching a few images using the new function (f_cone is new too) along 
> with other pattern/function updates previously posted to this newsgroup.
> 
...

An image applying the leopard pattern somewhat like Mike Williams's 
technique for creating shapes with lots of holes via isosurfaces instead 
of traditional csg differences (which are frequently very slow). Here 
the shape is porous throughout.

Once in a while, ray tracing, I end up with an image or shape which I 
find disturbing on some sensory level. For me, this is one of them. Why 
I didn't post it originally, but I do think it interesting.

Bill P.


Post a reply to this message


Attachments:
Download 'f_labsweep_cone02_leprd.png' (428 KB)

Preview of image 'f_labsweep_cone02_leprd.png'
f_labsweep_cone02_leprd.png


 

From: Bald Eagle
Subject: Re: Function / pattern issues. New f_labsweep.
Date: 27 Apr 2020 07:05:01
Message: <web.5ea6bb8bc1f31fbfb0b41570@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> An image applying the leopard pattern ...

> ...I do think it interesting.

Nice  :)

The pattern looks alittle stretched in the y direction, giving it that anti-slip
stair tread look.

https://sc01.alicdn.com/kf/HTB1eq0dFVXXXXciXFXXq6xXFXXX9/205993684/HTB1eq0dFVXXXXciXFXXq6xXFXXX9.jpg


Post a reply to this message

From: jr
Subject: Re: Function / pattern issues. New f_labsweep.
Date: 27 Apr 2020 11:05:00
Message: <web.5ea6f3bcc1f31fb898043f30@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> On 4/26/20 7:37 AM, William F Pokorny wrote:
> ...
> Once in a while, ray tracing, I end up with an image or shape which I
> find disturbing on some sensory level. For me, this is one of them.

although, trim off the cones and you'll have a perfectly good washing machine
drum.

:-)


regards, jr


Post a reply to this message

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