POV-Ray : Newsgroups : povray.binaries.images : no water in the garden Server Time
2 Jun 2024 03:42:25 EDT (-0400)
  no water in the garden (Message 18 to 27 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: no water in the garden
Date: 14 Nov 2017 12:55:01
Message: <web.5a0b2d07b458f717c437ac910@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:

> Working also on a feather's macro.

IIRC, I found a great little feather macro a few years ago.
I can't seem to find it online, but I can check on my laptop at home.

Unless anyone else is familiar with it, and has a link or archive copy.

<cough> <sotto voce> (Thomas) </sotto voce> <cough>


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 14 Nov 2017 14:40:01
Message: <web.5a0b4640b458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> IIRC, I found a great little feather macro a few years ago.
> I can't seem to find it online, but I can check on my laptop at home.
>

I have found this in newsgroup but the link is dead.

http://news.povray.org/povray.binaries.images/message/%3C39ea2c56%40news.povray.org%3E/

I have made a feather for my picture but only one side is good.


Post a reply to this message

From: Bald Eagle
Subject: Re: no water in the garden
Date: 14 Nov 2017 15:20:00
Message: <web.5a0b4f98b458f717c437ac910@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:

> I have found this in newsgroup but the link is dead.
>
http://news.povray.org/povray.binaries.images/message/%3C39ea2c56%40news.povray.org%3E/
>
> I have made a feather for my picture but only one side is good.

Right, I saw that - I'm not sure it's the same author though.

Also - just thought you might be interested in what I did with a propeller -
seems similar to making a feather...

http://news.povray.org/povray.binaries.images/thread/%3Cweb.53dbe8daf072be945e7df57c0%40news.povray.org%3E/?ttop=418740
&toff=500


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 14 Nov 2017 15:50:01
Message: <web.5a0b568ab458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Also - just thought you might be interested in what I did with a propeller -
> seems similar to making a feather...
>
Indeed, I am no using spline for the moment, just maths functions (cos, sin, and
a little random) and sphere_sweep to draw the rachis and barbs. I will use
spline for the shape of the vane.


Post a reply to this message

From: Bald Eagle
Subject: Re: no water in the garden
Date: 14 Nov 2017 19:20:01
Message: <web.5a0b87f1b458f7175cafe28e0@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
> > Also - just thought you might be interested in what I did with a propeller -
> > seems similar to making a feather...
> >
> Indeed, I am no using spline for the moment, just maths functions (cos, sin, and
> a little random) and sphere_sweep to draw the rachis and barbs. I will use
> spline for the shape of the vane.

So, I couldn't find a personal copy anywhere, but Wheee!  The Wayback Machine
had one  :)

https://web.archive.org/web/20050413175956/http://baillp.free.fr:80/Data/feather.inc

Here's some quick code to get you started:

#version 3.71;

global_settings {
 assumed_gamma 1.0
}

#declare Aspect = image_width/image_height;
camera {
 location <0, 0, -2>
 right x*Aspect
 look_at <0, 0, 0>
}

#include "colors.inc"
#include "feather.inc"

light_source { <10, 50, 0>  color rgb <1, 1, 1>}

#declare _seed = 123;
#declare _seedcolor = 345;
#declare _length = 1;
#declare _width = 0.25;
#declare _depth = 0.01;
#declare _sym = 0.9;
#declare _fun = 0.8;
#declare _test = false;

object {Feather(_seed, _seedcolor, _length, _width, _depth, _sym, _fun, _test)}


Post a reply to this message

From: Thomas de Groot
Subject: Re: no water in the garden
Date: 15 Nov 2017 02:57:54
Message: <5a0bf382$1@news.povray.org>
On 14-11-2017 18:51, Bald Eagle wrote:
> "Fractracer" <lg.### [at] gmailcom> wrote:
> 
>> Working also on a feather's macro.
> 
> IIRC, I found a great little feather macro a few years ago.
> I can't seem to find it online, but I can check on my laptop at home.
> 
> Unless anyone else is familiar with it, and has a link or archive copy.
> 
> <cough> <sotto voce> (Thomas) </sotto voce> <cough>
> 

Unfortunately...

-- 
Thomas


Post a reply to this message

From: Bald Eagle
Subject: Re: no water in the garden
Date: 15 Nov 2017 06:30:00
Message: <web.5a0c24a4b458f7175cafe28e0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> 
https://web.archive.org/web/20050413175956/http://baillp.free.fr:80/Data/feather.inc


Just a loop to show some variation.
Looks like _sym and _fun need to be kept between 0 and 1.
There may be some other refinements needed to get rid of some domain error in
asin and divide by zero errors, but if you look through Mr. Baillehache's code,
it's quite --- intricate.

[Side note:  it seems he moved to Japan and just kept on runnin' with that math
thing....
http://www.bayashiinjapan.net/CollisionDetection/3dCollisionDetectionFourierMotzkin.pdf
]


---------------------------------- test scene -------------------------

#version 3.71;

global_settings {
 assumed_gamma 1.0
}

#declare Aspect = image_width/image_height;
camera {
 location <0, 1, -10>
 right x*Aspect
 look_at <0, 1, 0>
}

#include "colors.inc"
#include "feather.inc"

light_source { <10, 50, 0>  color rgb <1, 1, 1>}

#declare _Seed = 10;
#declare _Seedcolor = 20;
#declare _length = 2;
#declare _width = 0.25;
#declare _depth = 0.01;
#declare _Sym = 0.1;
#declare _Fun = 0.05;
#declare _test = false;


#for (F, 1, 10)
 #declare _seed = _Seed * F;
 #declare _seedcolor = _Seedcolor * F;
 #declare _sym = _Sym + F*0.08;
 #declare _fun = _Fun + F*0.08;
 object {Feather(_seed, _seedcolor, _length, _width, _depth, _sym, _fun, _test)
translate <-5+F, 0, 0>}
#end


Post a reply to this message


Attachments:
Download 'feather.png' (39 KB)

Preview of image 'feather.png'
feather.png


 

From: Fractracer
Subject: Re: no water in the garden
Date: 15 Nov 2017 07:55:01
Message: <web.5a0c391bb458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > 
https://web.archive.org/web/20050413175956/http://baillp.free.fr:80/Data/feather.inc
>
>
> Just a loop to show some variation.
> Looks like _sym and _fun need to be kept between 0 and 1.
> There may be some other refinements needed to get rid of some domain error in
> asin and divide by zero errors, but if you look through Mr. Baillehache's code,
> it's quite --- intricate.
>

Who better than an eagle could help me for the feathers ;)
Thank you for your help, I have a quick look at the code, complicated, but whith
tima and patience I think I can adapt or modified the code, maybe using
sphere_sweep for a curved rachis...
Also I will add the possibility of changing the textures (easy).


Post a reply to this message

From: Bald Eagle
Subject: Re: no water in the garden
Date: 15 Nov 2017 21:20:00
Message: <web.5a0cf4ceb458f7175cafe28e0@news.povray.org>
"Fractracer" <lg.### [at] gmailcom> wrote:

> Who better than an eagle could help me for the feathers ;)
Ha!  It often gets amusing around here.
I still remember your help with circumscribing spheres around triangles  :)
I might want to try a variation of that using geometric inversion...

> Thank you for your help, I have a quick look at the code, complicated, but whith
> tima and patience I think I can adapt or modified the code, maybe using
> sphere_sweep for a curved rachis...

I've had a chance to edit it for clarity, and I added 2 (crude) blocks of code
to restrict the asin argument to between -1 and 1.  As I'm sure you've noticed
it throws a "domain error in asin" error - probably due to small rounding
errors.
Maybe soon I'll decipher the meaning and function of the calculations - it seems
at first glance to be some repetitive sphere-cylinder sweeps that move up and
then down the rachis.
I think the rachis could be redefined with a spline or array, and then the rest
of code could be adjusted to make the rest of the feather using those variable
points rather than a fixed x-coordinate.

It looks like _sym probably needs to be limited to between 0 and 1 (I haven't
extensively tested this yet)
but _fun is a variable that is used to calculate a probability which seems to
control the appearance of imperfections - the peeling and separation.  I've only
varied that from 0.5 to 1.3 in my last test, and it was fine.

> Also I will add the possibility of changing the textures (easy).

Yes, I was wondering how to get something other than a banded pattern, and more
of a realistic pattern.  Possibly as another parameter for the macro so that the
pattern can be defined in the scene and passed to the macro.

There also seems to be some unnecessary calculations, and "magic numbers" - it
would be great to simplify a lot of that, move the equations out into some
descriptive #declare or #local statements, and then use those meaningful
variable names in the calculations so that it's easier to follow what's going
on.


Post a reply to this message

From: Fractracer
Subject: Re: no water in the garden
Date: 16 Nov 2017 06:45:01
Message: <web.5a0d79f1b458f71723dc70330@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> I've had a chance to edit it for clarity, and I added 2 (crude) blocks of code
> to restrict the asin argument to between -1 and 1.  As I'm sure you've noticed
> it throws a "domain error in asin" error - probably due to small rounding
> errors.

Yes, a lot of. I have made a debug file to see the values output by
asin(2.*_x/_l-1.0) // in the #while (_x<=_l-_xp) loop drawing spheres and
cylinders for the barbs //. SOme of this values are > to 1.5 (when _x = 0). In
fact the errors appears at the start and at the end of the loop. Maybe easy to
fix, I will see this this evening.

> Maybe soon I'll decipher the meaning and function of the calculations - it
> seems at first glance to be some repetitive sphere-cylinder sweeps that move
> up and then down the rachis.

You're right, the cylinders are drawn in x plane, it is the cause of the colored
gradient of the feather.

> I think the rachis could be redefined with a spline or array, and then the
> rest of code could be adjusted to make the rest of the feather using those
> variable points rather than a fixed x-coordinate.

The barbs may also made with sphere_sweep (like on my previous picture), but
this need a lot of objects to obtain a tighten feather.

> It looks like _sym probably needs to be limited to between 0 and 1 (I haven't
> extensively tested this yet) but _fun is a variable that is used to calculate > a
probability which seems to control 
the appearance of imperfections - the
> peeling and separation.  I've only varied that from 0.5 to 1.3 in my last
> test, and it was fine.

Unless we want some extravagant feather...

> Yes, I was wondering how to get something other than a banded pattern, and
> more of a realistic pattern.  Possibly as another parameter for the macro so
> that the pattern can be defined in the scene and passed to the macro.
>
See the picture, I made it fast...

> There also seems to be some unnecessary calculations, and "magic numbers" - it
> would be great to simplify a lot of that, move the equations out into some
> descriptive #declare or #local statements, and then use those meaningful
> variable names in the calculations so that it's easier to follow what's going
> on.

Some cleaning...
Two brains are better than one.


Post a reply to this message


Attachments:
Download 'feather1.png' (435 KB)

Preview of image 'feather1.png'
feather1.png


 

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

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