POV-Ray : Newsgroups : povray.general : Semiregular pattern doodles Server Time
4 Dec 2024 21:22:58 EST (-0500)
  Semiregular pattern doodles (Message 1 to 5 of 5)  
From: Bald Eagle
Subject: Semiregular pattern doodles
Date: 16 Jun 2023 20:40:00
Message: <web.648d0034448c7c221f9dae3025979125@news.povray.org>
RL has had me wrapped up in a bunch of things, some very good, some very bad -
but to kick back and relax, I was looking through some search results for videos
to entertain/inspire, and I came across an introductory Shadertoy video where
they make a grid of circles of random sizes.

I didn't think we had a simple and obvious way of already doing this, so I made
some disks, circles, filled squares, and hollow squares.

There are lots of other distance functions to choose from, to make other basic
shapes.
https://iquilezles.org/articles/distfunctions2d/

The shape size is currently controlled by f_noise3d, but I suppose just about
any function could be used to control the size.

It's also likely that other functions could be used to modulate the actual
shape, and with a bit (a lot) more work, this could generate some interesting
isosurfaces.  Certainly some nice height fields.

Might make the basis for a greeble texture, a cityscape, or any other number of
things, esp if implemented in 3D.


Just thought I'd share this little doodle.


Post a reply to this message


Attachments:
Download 'random sized pattern 1.png' (77 KB)

Preview of image 'random sized pattern 1.png'
random sized pattern 1.png


 

From: William F Pokorny
Subject: Re: Semiregular pattern doodles
Date: 17 Jun 2023 09:50:43
Message: <648dba33$1@news.povray.org>
On 6/16/23 20:37, Bald Eagle wrote:
> RL has had me wrapped up in a bunch of things, some very good, some very bad -
> but to kick back and relax, I was looking through some search results for videos
> to entertain/inspire, and I came across an introductory Shadertoy video where
> they make a grid of circles of random sizes.

Real life is keeping me busy of late too.

Cool post. The squares reminded me of the Irregular_Bricks_Ptrn() macro 
shipped with textures.inc - excepting the latter has somewhat obvious 
symmetry. See attached image.

---

The recent L-Systems posts, reminded me of a rough idea I've had banging 
around in my head for a long while. One of building up isosurfaces based 
upon chained dependencies to some depth. Similar I think to your direct 
dependency on f_noise3d but, more like:

If stage one trunk covering location B12, use this stage two branch 
function and so on. Perhaps also making adjustments to each stage's 
behavior based upon the "test location's" inside values.

Practically, I doubt we could get very deep at acceptable performance 
but, who knows. Maybe, deep enough to create simple branched plants or 
the like. Anyhow, someday I hope the idea bubbles to the top of my "play 
with it" list...

Bill P.


Post a reply to this message


Attachments:
Download 'irregular_bricks_ptrn.jpg' (82 KB)

Preview of image 'irregular_bricks_ptrn.jpg'
irregular_bricks_ptrn.jpg


 

From: Droj
Subject: Re: Semiregular pattern doodles
Date: 18 Jun 2023 14:45:00
Message: <web.648f4f37f1e84230e68157b63b2af915@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

>
> The recent L-Systems posts, reminded me of a rough idea I've had banging
> around in my head for a long while. One of building up isosurfaces based
> upon chained dependencies to some depth. Similar I think to your direct
> dependency on f_noise3d but, more like:
>
> If stage one trunk covering location B12, use this stage two branch
> function and so on. Perhaps also making adjustments to each stage's
> behavior based upon the "test location's" inside values.
>
> Practically, I doubt we could get very deep at acceptable performance
> but, who knows. Maybe, deep enough to create simple branched plants or
> the like. Anyhow, someday I hope the idea bubbles to the top of my "play
> with it" list...
>
> Bill P.

Hi,

that's what L-Systems is all about, at least what P. Prusinkiewicz has published
about the growth of plants and trees
(http://algorithmicbotany.org/papers/#abop).

The syntax of L-Systems is 'alien' - to put it mildly - but to create patterns
or simple branched trees or plants in 2D - that's the easy part of the game.
The tough part and where I'm stuck now is to persuade Povray to produce
something in 3D. That makes my tiny brain burn.

@BE Sorry for misusing your threat to keep the L-Systems banners high.
Love your semiregular pattern doodles.
Here a regular pattern doodle - of course L-System!

Droj


Post a reply to this message


Attachments:
Download 'pb_lsystems_25_14.png' (67 KB)

Preview of image 'pb_lsystems_25_14.png'
pb_lsystems_25_14.png


 

From: Bald Eagle
Subject: Re: Semiregular pattern doodles
Date: 18 Jun 2023 18:00:00
Message: <web.648f7e5df1e842301f9dae3025979125@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> that's what L-Systems is all about, at least what P. Prusinkiewicz has published
> about the growth of plants and trees
> (http://algorithmicbotany.org/papers/#abop).

I came across a thread a while back where someone was getting a tree to "grow"
towards the light from inside a gazebo-type structure.  Pretty interesting work.

> The syntax of L-Systems is 'alien' - to put it mildly - but to create patterns
> or simple branched trees or plants in 2D - that's the easy part of the game.
> The tough part and where I'm stuck now is to persuade Povray to produce
> something in 3D. That makes my tiny brain burn.

So don't think in Cartesian coordinates, think in polar.  Rather than "move
right by 4 units", think "rotate a 4-unit x vector around the z axis by N
degrees"
And then do another rotation around the y axis.
Remember "the surface of a sphere is 2D".
Latitude, longitude.  2 dimensions.


> @BE Sorry for misusing your threat to keep the L-Systems banners high.

Hah.  No worries.  We all try to build upon other foundations. Plus, some of my
best threads are hijacked ones.  :D

> Love your semiregular pattern doodles.

You have to check out shadertoy - they have mind-blowing stuff.

Also, I was just putzing around with the existing scene for a few minutes, and
changed the size control of the shape from a stepwise floor() function to direct
control by a scaled noise function.

Kinda looks like cubic raindrops fell and splashed - or something.

- BE


Post a reply to this message


Attachments:
Download 'random sized pattern 1.png' (190 KB)

Preview of image 'random sized pattern 1.png'
random sized pattern 1.png


 

From: Bald Eagle
Subject: Re: Semiregular pattern doodles
Date: 19 Jun 2023 21:05:00
Message: <web.6490fa2ef1e842301f9dae3025979125@news.povray.org>
So, as I was coding this little scene up, I realized that I needed a "proper"
mod function to behave regularly and consistently across the origin.

The user defined function I use to do this is:

#declare fmod = function (T) {select (T, 1-mod (abs(T), 1), mod (abs(T), 1))}

(This just creates a sawtooth function that treats every integer along the
relevant axis as 0, progressing up to 0.9999999999999.... and then it starts
over at 0 at the next integer value.  So that's how the plane gets divided up
into unit squares.  Then everything just gets offset by 0.5 to bring the origin
of each square to the center.)

It would be a useful thing to make such a function available in source, in
functions.inc, or perhaps add a note in the documentation about how the stock
mod () function probably doesn't do what a new user might expect it to.

Using floor () gives me a constant integer value inside of each unit square, so
that the value I get from f_noise3d stays the same inside of each square.

Then I can just write "standard" equations for things like circles, and use Mike
Williams' abs (f(n) - val) trick to give the infinitely thin line resulting from
the mathematical solution some width.

Just in case anyone was interested in experimenting with rolling their own
pigment pattern functions.

- BW


Post a reply to this message

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