POV-Ray : Newsgroups : povray.beta-test.binaries : Function / pattern issues. New f_labsweep. Server Time10 Sep 2024 13:13:22 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>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5ea57285%241%40news.povray.org",
"headline": "Function \/ pattern issues. New f_labsweep.",
"dateCreated": "2020-04-26T11:37:41+00:00",
"datePublished": "2020-04-26T11:37:41+00:00",
"author": {
"@type": "Person",
"name": "William F Pokorny"
}
}
<---------------------- References. Five previous posts

and

---
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.
```

Attachments:

Preview of image '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>
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#5ea6a68a%241%40news.povray.org",
"headline": "Re: Function \/ pattern issues. New f_labsweep.",
"dateCreated": "2020-04-27T09:31:54+00:00",
"datePublished": "2020-04-27T09:31:54+00:00",
"author": {
"@type": "Person",
"name": "William F Pokorny"
}
}
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.
```

Attachments:

Preview of image 'f_labsweep_cone02_leprd.png'

 From: Bald Eagle Subject: Re: Function / pattern issues. New f_labsweep. Date: 27 Apr 2020 07:05:01 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.5ea6bb8bc1f31fbfb0b41570%40news.povray.org",
"headline": "Re: Function \/ pattern issues. New f_labsweep.",
"dateCreated": "2020-04-27T11:05:01+00:00",
"datePublished": "2020-04-27T11:05:01+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
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

https://sc01.alicdn.com/kf/HTB1eq0dFVXXXXciXFXXq6xXFXXX9/205993684/HTB1eq0dFVXXXXciXFXXq6xXFXXX9.jpg
```
 From: jr Subject: Re: Function / pattern issues. New f_labsweep. Date: 27 Apr 2020 11:05:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.5ea6f3bcc1f31fb898043f30%40news.povray.org",
"headline": "Re: Function \/ pattern issues. New f_labsweep.",
"dateCreated": "2020-04-27T15:05:00+00:00",
"datePublished": "2020-04-27T15:05:00+00:00",
"author": {
"@type": "Person",
"name": "jr"
}
}
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
```