|
|
|
|
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 9 Mar 2023 18:39:31
Message: <640a6e33$1@news.povray.org>
|
|
|
| |
| |
|
|
In the past few years Ingo, Tor Olav and others have played around with
include files supporting complex numbers for sound and images. Attached
is an image using a few of 30 plus inbuilt complex functions added to
the povr fork. Mostly just wrapping the complex functions coming with
C++11, but sometimes using function names more in line with the existing
complex includes and POV-Ray's function naming.
In povr, to work with the existing function vm, packing two 32 bit
floats into a double space as the complex value and all complex function
code runs at single float accuracy.
The render takes advantage of povr's big jitter and v3.8's ability to
write png files at a reduced bit depth; I used +fn4 to get the file size
down to something reasonable. Given the detail the image doesn't
compress well.
Bill P.
//---
...
#include "functions.inc"
#include "cfunctions.inc"
#declare Fn00 = function { f_hash(y,Seed00,0.0005,0) }
#declare Pigm00 = pigment {
function {
Fn00(
cf_real(cf_pow(cf_cmplx(abs(x),y),cf_cmplx(4.4,0))),
cf_imag(cf_pow(cf_cmplx(abs(x),y),cf_cmplx(4.4,0))),
z)
}
color_map {
...
}
...
//---
cf_abs, cf_acos, cf_acosh, cf_add, cf_asin, cf_asinh, cf_atan,
cf_atanh, cf_cmplx, cf_conj, cf_cos, cf_cosh, cf_div, cf_exp,
cf_imag, cf_inv, cf_ln, cf_log, cf_mul, cf_neg, cf_norm, cf_phase,
cf_polar, cf_pow, cf_proj, cf_real, cf_sin, cf_sinh, cf_sqr,
cf_sqrt, cf_sub, cf_tan, cf_tanh
Post a reply to this message
Attachments:
Download 'kaboom.png' (230 KB)
Preview of image 'kaboom.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I like the image itself, it's a very artistic-looking render. Like a painting.
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 10 Mar 2023 05:08:23
Message: <640b0197@news.povray.org>
|
|
|
| |
| |
|
|
On 3/9/23 20:51, Kenneth wrote:
> I like the image itself, it's a very artistic-looking render. Like a painting.
>
Thanks. :-)
I'll attach another I liked while playing. Same set up with complex
functions, but much lower power exponents. Plus adding in some spiral
action in the middle.
Another bit I stumbled across working with cf_pow() 'warping' is the
effective change in scaling from the origin outward makes it pretty easy
to set up images which change from a near constant color away from the
origin to something where the f_hash()-ing is clear.
In other words, when the changes in region due the f_hash(), and/or
higher cf_pow exponents, are happening at >>1 per pixel we end up with
kind of an aggregate color. As we move to the origin things spread out
and and we get a fade-in effect. FWIW, I guess, but neat. Hints at a
possible general technique with on top of f_hash() for fading in or out
of near constant colors.
Bill P.
Post a reply to this message
Attachments:
Download 'kaboomkeep3.jpg' (498 KB)
Preview of image 'kaboomkeep3.jpg'
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 10 Mar 2023 07:11:35
Message: <640b1e77$1@news.povray.org>
|
|
|
| |
| |
|
|
Op 10-3-2023 om 11:08 schreef William F Pokorny:
> On 3/9/23 20:51, Kenneth wrote:
>> I like the image itself, it's a very artistic-looking render. Like a
>> painting.
>>
>
> Thanks. :-)
>
> I'll attach another I liked while playing. Same set up with complex
> functions, but much lower power exponents. Plus adding in some spiral
> action in the middle.
>
> Another bit I stumbled across working with cf_pow() 'warping' is the
> effective change in scaling from the origin outward makes it pretty easy
> to set up images which change from a near constant color away from the
> origin to something where the f_hash()-ing is clear.
>
> In other words, when the changes in region due the f_hash(), and/or
> higher cf_pow exponents, are happening at >>1 per pixel we end up with
> kind of an aggregate color. As we move to the origin things spread out
> and and we get a fade-in effect. FWIW, I guess, but neat. Hints at a
> possible general technique with on top of f_hash() for fading in or out
> of near constant colors.
>
> Bill P.
>
Ooh! This one is nice! Going to download it: could be useful for
something ;-)
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 11 Mar 2023 04:17:19
Message: <640c471f@news.povray.org>
|
|
|
| |
| |
|
|
On 3/10/23 07:11, Thomas de Groot wrote:
> Ooh! This one is nice! Going to download it: could be useful for
> something 😉
:-) How about a POV-Ray, user ink blot test image?
"That Looks like an ink blot test," is what I thought on getting the
result - and I'm never letting you all know I see in there! ;-)
Here again a complex function 'warp' acting on a small portion of a
photograph; where I also used those undocumented / hidden, image_map,
repeat and offset options.
Bill P.
Post a reply to this message
Attachments:
Download 'povrayinkblottest.jpg' (409 KB)
Preview of image 'povrayinkblottest.jpg'
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 11 Mar 2023 07:15:41
Message: <640c70ed$1@news.povray.org>
|
|
|
| |
| |
|
|
Op 11-3-2023 om 10:17 schreef William F Pokorny:
> On 3/10/23 07:11, Thomas de Groot wrote:
>> Ooh! This one is nice! Going to download it: could be useful for
>> something 😉
>
> :-) How about a POV-Ray, user ink blot test image?
>
> "That Looks like an ink blot test," is what I thought on getting the
> result - and I'm never letting you all know I see in there! ;-)
>
LOL! I wont either! ;-)
> Here again a complex function 'warp' acting on a small portion of a
> photograph; where I also used those undocumented / hidden, image_map,
> repeat and offset options.
>
>
Fascinating stuff indeed.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
>
> :-) How about a POV-Ray, user ink blot test image?
>
That is really interesting and fabulous! I can imagine all sorts of
different-looking and visually unexpected results from using this technique.
One possible use would be for texturing the walls in a room-- like wall paper.
Or for creating designs for floor rugs and carpets.
Post a reply to this message
|
|
| |
| |
|
|
From: kurtz le pirate
Subject: Re: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 28 Apr 2023 04:10:08
Message: <644b7f60$1@news.povray.org>
|
|
|
| |
| |
|
|
On 10/03/2023 00:39, William F Pokorny wrote:
> In the past few years Ingo, Tor Olav and others have played around with
> include files supporting complex numbers for sound and images. Attached
> is an image using a few of 30 plus inbuilt complex functions added to
> the povr fork. Mostly just wrapping the complex functions coming with
> C++11, but sometimes using function names more in line with the existing
> complex includes and POV-Ray's function naming.
>
> In povr, to work with the existing function vm, packing two 32 bit
> floats into a double space as the complex value and all complex function
> code runs at single float accuracy.
>
>
Sorry to re-open this old discussion. I didn't know this pov4 group exist :(
Anyway, i too have worked a lot in the world of complex numbers. I
started to write a macro library that implements complex functions using
povray "function".
And so: is "cfunctions.inc" just an encapsulation of C functions ?
Does v4 include a new data type like c = <re,im> with the possibility to
access c.re and c.im ?
I'm attaching my "complex_functions.inc" just in case ... I continue to
develop it or I wait for v4 ?
last thing : where can I find "cfunctions.inc" ?
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
Attachments:
Download 'complex_functions.inc.txt' (34 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
kurtz le pirate <kur### [at] gmailcom> wrote:
> ...
> last thing : where can I find "cfunctions.inc" ?
installs as part of 'povr' branch (published in p.b.programming)
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
From: kurtz le pirate
Subject: Re: Suggest v4.0 inbuilt complex functions. (povr R7 v0.6.1.0)
Date: 29 Apr 2023 02:28:40
Message: <644cb918$1@news.povray.org>
|
|
|
| |
| |
|
|
On 28/04/2023 16:10, jr wrote:
> hi,
>
> kurtz le pirate <kur### [at] gmailcom> wrote:
>> ...
>> last thing : where can I find "cfunctions.inc" ?
>
> installs as part of 'povr' branch (published in p.b.programming)
>
>
> regards, jr.
>
Find. Thank jr
But as I suspected, the functions are just calls to internal functions.
so I will continue my work
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|