POV-Ray : Newsgroups : povray.advanced-users : Making Patterns with functions Server Time
22 Dec 2024 05:38:25 EST (-0500)
  Making Patterns with functions (Message 11 to 20 of 48)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Kenneth
Subject: Re: Making Patterns with functions
Date: 24 Jan 2024 01:05:00
Message: <web.65b0a85dd81b84799b4924336e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
> (Still experimenting and struggling with various aspects of getting patterns
> from other platforms to play well with SDL.)
>
> Important tips to generate quality patterns from equations
> ----------------------------------------------------------

> Use Mike Williams' "shell" trick for isosurfaces to give an infinitely thin line
> a visible thickness

Say what??!!
That would be really useful.

Do you have a link to this trick, or a short explanation? (--keeping my fingers
crossed--)


Post a reply to this message

From: Kenneth
Subject: Re: Making Patterns with functions
Date: 24 Jan 2024 02:00:01
Message: <web.65b0b43dd81b84799b4924336e066e29@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:

>
> > Use Mike Williams' "shell" trick for isosurfaces to give an infinitely
> > thin line a visible thickness
>
>
> Do you have a link to this trick, or a short explanation? (--keeping my fingers
> crossed--)

I just took a look at the Mike Williams 'isosurface tutorial' that you packaged
and sent to me as a .pdf file some years ago. Is the technique you refer to here
the same as Mike's 'thickening' trick using 2 parallel surfaces (page 18 of
149)? Or is it something different?

Thickening--
If we have a function F(x,y,z) we can turn it into two parallel surfaces by
using abs(F(x,y,z))-C where C is some small value. The original function should
be one that works with zero threshold. The two resulting surfaces are what you
would get by rendering the original function with threshold +C and -C, but
combined into a single image. The space between the two surfaces becomes the
"inside" of the object. In this way we can construct things like glasses and
cups that have walls of non-zero thickness.

[example:]
#declare F = function {y + f_noise3d (x*2, 0, z*2)}
isosurface {
function {abs (F(x, y, z))-0.1}
......


Post a reply to this message

From: Bald Eagle
Subject: Re: Making Patterns with functions
Date: 24 Jan 2024 06:40:00
Message: <web.65b0f5f3d81b84791f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> Is the technique you refer to here
> the same as Mike's 'thickening' trick using 2 parallel surfaces (page 18 of
> 149)? Or is it something different?

It is the same - yet with a slight difference.

If you're trying to make a black pattern on a white background, you're going to
want a solid black pattern, not a small gradient from -C to 0 to +C.

So you just use select to make a discontinuous function.

#declare Pattern = function {select (abs(F(x,y,z)-C, 0, 0, 1)}

And then when you do plane {z, 0, pigment {function {Pattern (x, y, z)}}}, you
get what you're probably expecting.

- BW


Post a reply to this message

From: Kenneth
Subject: Re: Making Patterns with functions
Date: 24 Jan 2024 09:30:00
Message: <web.65b11ea5d81b84799b4924336e066e29@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Kenneth" <kdw### [at] gmailcom> wrote:
>
> > Is the technique you refer to here
> > the same as Mike's 'thickening' trick using 2 parallel surfaces (page 18 of
> > 149)? Or is it something different?
>
> It is the same - yet with a slight difference.
>
> If you're trying to make a black pattern on a white background, you're going to
> want a solid black pattern, not a small gradient from -C to 0 to +C.
>
> So you just use select to make a discontinuous function.
>
> #declare Pattern = function {select (abs(F(x,y,z)-C, 0, 0, 1)}
>
> And then when you do plane {z, 0, pigment {function {Pattern (x, y, z)}}}, you
> get what you're probably expecting.
>
Great, thanks. Yes, you were reading my mind, ha. (Actually, my own use would be
the reverse-- a white pattern on a black background.) I'll test it and play...


Post a reply to this message

From: Bald Eagle
Subject: Re: Making Patterns with functions
Date: 12 Feb 2024 18:50:00
Message: <web.65caadc8d81b84791f9dae3025979125@news.povray.org>
I played with a few more functions - I think I'm up to about 189 in the
collection, and still have many more to implement.

This one I liked because it was "simple", and would probably find use in any
number of scenes, for different purposes.

Like the ultra-impressive Greek frieze pattern, this one got adapted from
Desmos, and it takes a lot of reading and thinking to grasp Desmos' syntax /
expression structure, unravel what is meant, and discard the superfluous parts.

I got it wrong about a dozen times, but in the process found that sometimes the
mistakes yield some pretty amazing and complex pattern in and of themselves.
So, when experimenting with new patterns, don't give up, and don't be surprised
when the raw pattern seems to bear absolutely no relation to the pattern that
you're trying to code.  The raw vs "thickened" pattern can differ - starkly - in
appearance.

Hopefully we can get a few new patterns posted in this thread, and I'm going to
try to post at least one new pattern a week, to keep some momentum going.

Hope you like.

- BE


Post a reply to this message


Attachments:
Download 'mathpatterns1.png' (59 KB)

Preview of image 'mathpatterns1.png'
mathpatterns1.png


 

From: Bald Eagle
Subject: Re: Making Patterns with functions
Date: 13 Feb 2024 18:15:00
Message: <web.65cbf72dd81b84791f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> I'm going to try to post at least one new pattern a week, to keep some momentum
going.


Post a reply to this message


Attachments:
Download 'mathpatterns1.png' (193 KB)

Preview of image 'mathpatterns1.png'
mathpatterns1.png


 

From: Bald Eagle
Subject: Re: Making Patterns with functions
Date: 13 Feb 2024 18:20:00
Message: <web.65cbf809d81b84791f9dae3025979125@news.povray.org>
Neat grid pattern.


Post a reply to this message


Attachments:
Download 'mathpatterns1.png' (15 KB)

Preview of image 'mathpatterns1.png'
mathpatterns1.png


 

From: Tor Olav Kristensen
Subject: Re: Making Patterns with functions
Date: 13 Feb 2024 20:00:00
Message: <web.65cc1037d81b8479f673154389db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > I'm going to try to post at least one new pattern a week, to keep some momentum
going.

I like this one.

It seems like you're getting pretty good at this.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Bald Eagle
Subject: Re: Making Patterns with functions
Date: 13 Feb 2024 20:55:00
Message: <web.65cc1c56d81b84791f9dae3025979125@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:

> I like this one.

I do too, which is why I posted it.
It brought to mind the vintage Corelle plate rim pattern. (attached)

> It seems like you're getting pretty good at this.

I'm getting a bit better at finding interesting patterns and translating them
from other languages/syntaxes.

I still have a devil of a time with some of them.
Some I can't get to work at all, especially if I have to make lines, use x and y
at the same time, or try to make a parametric function based on atan2(y, x).

I'm also trying to figure out why sometimes I only get a partial pattern.
But they _are_ more than formless grayscale vomit, so there is definitely some
progress.

When I understand WHY things work or don't, and know enough to fix them, then I
will be lots better.

When I can invent such functions on my own, then I will be good.

But that was half of the goal of this - to try implementing so many functions
that eventually I found changes that worked, and could be applied to others that
failed, and iteratively get better.

I'm almost at 200 functions, and at some point I'll have (temporarily) run out
of patterns to copy, and can start investigating variations and combinations.

There also seems to be various common methods for making patterns, and perhaps I
can distill them all down into several macros to make rendering each method a
little easier.

Thank you as always for your interest, tutelage, and encouragement.  :)
- BW


Post a reply to this message


Attachments:
Download 'p0000016777s000000469617t1.jpg' (81 KB)

Preview of image 'p0000016777s000000469617t1.jpg'
p0000016777s000000469617t1.jpg


 

From: Bald Eagle
Subject: Re: Making Patterns with functions
Date: 13 Feb 2024 21:05:00
Message: <web.65cc1f5ed81b84791f9dae3025979125@news.povray.org>
Here's one to torture your eyes.  :P


Post a reply to this message


Attachments:
Download 'mathpatterns1.png' (422 KB)

Preview of image 'mathpatterns1.png'
mathpatterns1.png


 

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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