POV-Ray : Newsgroups : povray.binaries.images : nonperiodic contours Server Time
1 Nov 2024 23:13:38 EDT (-0400)
  nonperiodic contours (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Anton Sherwood
Subject: nonperiodic contours
Date: 17 Jan 2002 15:35:11
Message: <3C47378F.3AEE72C0@pobox.com>
I was browsing a collection of links about non-photorealistic rendering 
and got this idea.

#declare tau = (1+sqrt(5))/2;
#declare F0 = function {
	pigment { marble color_map { [0 rgb 0] [1 rgb 1] } }
        }
#declare F1 = function {
        pigment {
                marble color_map { [0 rgb 0] [1 rgb 1] }
                scale tau-1
                }
        }
#declare taumarble = function { (F0+F1)/2 }

Because tau is irrational (in a sense the most irrational number), the
pattern never repeats.

In the first image it's a bit turbled.


...those links: http://www.red3d.com/cwr/npr/
see especially http://www.algorithmic.com/gallery_e.html

-- 
Anton Sherwood  --  http://www.ogre.nu/


Post a reply to this message


Attachments:
Download 'marbknot.jpg' (14 KB) Download 'marbknot1.jpg' (14 KB)

Preview of image 'marbknot.jpg'
marbknot.jpg

Preview of image 'marbknot1.jpg'
marbknot1.jpg


 

From: JRG
Subject: Re: nonperiodic contours
Date: 17 Jan 2002 15:49:30
Message: <3c4738da@news.povray.org>
Anton Sherwood wrote:
> Because tau is irrational (in a sense the most irrational number)

Forgive my ignorance, but in what sense? And does your computer know that? (As far as
my computer is concerned, it usually hates when I talk about irrational numbers, it
makes it feel kinda inferior... ;)

> In the first image it's a bit turbled.

Nice pics :)



--
#local j=text{ttf"arial""JRG".2,0}#local J=0;#while(J<10)#local R=0;#while
(R<2)#local G=0;#while(G<1)#if(inside(j<R,G.1>))object{j scale.025translate
<R-1G-J/20J/-40+2>pigment{rgb<9J>}}#debug"O"#else#debug" "#end#local G=G+
.025;#end#local R=R+.05;#debug"\n"#end#local J=J+1;#end// JRG

Home: http://digilander.iol.it/jrgpov  //New: Kitchen scene WIP


Post a reply to this message

From: Anton Sherwood
Subject: Re: nonperiodic contours
Date: 17 Jan 2002 16:53:53
Message: <3C474A0C.BCE6A03F@pobox.com>
(That was quick!  I thought I'd have to wait weeks for my cue.)

> Anton Sherwood wrote:
> > ... tau is irrational (in a sense the most irrational number) ...

JRG wrote:
> Forgive my ignorance, but in what sense?

In the sense that the rational approximations to it
converge most slowly.

Every real number can be expressed as a continued fraction:

	x = a0 + 1/(a1 + 1/(a2 + 1/(a3 + 1/(a4 + 1/( ... )))))

where each a is a positive integer (except that a0 may be zero or
negative).  If x is rational, the sequence {a} is finite; conversely,
if you truncate the sequence, you get a rational number.

Now, it's obvious that the residue 1/(ai + ...) is somewhere
between 1/ai and 1/(ai+1), right?  Which implies that if ai is
high, the error in cutting off the sequence before ai is small.

Example.  The sequence for pi begins 3,7,15,1,292 ...
So the rational approximations to pi are:

	  (3)	     3/1	3.0
	  (7)	    22/7	3.143
	 (15)	   333/106	3.14151
	  (1)	   355/113	3.1415929 : pretty good!
	(292)	103993/33102	3.141592653
		     ...

(Which is why the knot you just saw is a union of 355 spheres.)

To make the error at each step as big as it can be, you pick the
smallest possible integers for {a}, i.e. all 1.  What does that give?

	x = 1 + 1/(1+ 1/(1+ 1/(1+ 1/(1+ 1/(1+ ...))))
	x = 1 + 1/x
	x^2 = x + 1

This quadratic has one positive root: (1+sqrt(5))/2, called tau,
the golden ratio.  (Also called phi, but I use phi for angles.)

-- 
Anton Sherwood  --  http://www.ogre.nu/


Post a reply to this message

From: JRG
Subject: Re: nonperiodic contours
Date: 17 Jan 2002 17:12:16
Message: <3c474c40@news.povray.org>
Aah, the golden ratio. I always thought of it just as the number to which the ratio
between two consequential numbers of Fibonacci's series converges... Ok I simply
never thought about it at all ;) And I usually use tau to indicate time (esp. in
relativistic contexts). Thanks for your explanation.

--
#local j=text{ttf"arial""JRG".2,0}#local J=0;#while(J<10)#local R=0;#while
(R<2)#local G=0;#while(G<1)#if(inside(j<R,G.1>))object{j scale.025translate
<R-1G-J/20J/-40+2>pigment{rgb<9J>}}#debug"O"#else#debug" "#end#local G=G+
.025;#end#local R=R+.05;#debug"\n"#end#local J=J+1;#end// JRG

Home: http://digilander.iol.it/jrgpov  //New: Kitchen scene WIP


Post a reply to this message

From: Anton Sherwood
Subject: Re: nonperiodic contours
Date: 17 Jan 2002 23:44:47
Message: <3C47AA5C.756AB75C@pobox.com>
Of course you could vary the effect by replacing marble with wood, etc.

For an interesting woodcut effect, you could render a scene once
normally, and then again with no lights, giving each object a gray
marbled (or wood) pigment; and threshold one against the other.
(Does that make sense?)

Any GIMP mavens here?  Is there a way to threshold one image against
another?

-- 
Anton Sherwood  --  http://www.ogre.nu/


Post a reply to this message

From: Slime
Subject: Re: nonperiodic contours
Date: 18 Jan 2002 01:21:54
Message: <3c47bf02$1@news.povray.org>
Unfortunately, any computer program rounds irrational numbers to rational
ones, but... whatever =)

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From:
Subject: Re: nonperiodic contours
Date: 18 Jan 2002 03:18:23
Message: <i4mf4u87mk8jc8hu70gmvr85t3riv7vad3@4ax.com>
On Thu, 17 Jan 2002 12:43:59 -0800, Anton Sherwood <bro### [at] poboxcom> wrote:
> #declare tau = (1+sqrt(5))/2;
> #declare F0 = function {
>	pigment { marble color_map { [0 rgb 0] [1 rgb 1] } }
>        }
> #declare F1 = function {
>        pigment {
>                marble color_map { [0 rgb 0] [1 rgb 1] }
>                scale tau-1
>                }
>        }
> #declare taumarble = function { (F0+F1)/2 }

BTW: you did it probably with megapov, right ? I think this becouse you not
attached (x,y,z) after F0 anf F1. For others playing with this on 3.5. Below
version afaik gives in 3.5 the same result as above:

#declare tau = (1+sqrt(5))/2;
#declare F0 = function{pattern{marble}}
#declare F1 = function{pattern{marble scale tau-1}}
#declare taumarble = function{(F0(x,y,z)+F1(x,y,z))/2 }

ABX


Post a reply to this message

From: Yadgar
Subject: Re: nonperiodic contours
Date: 20 Jan 2002 10:23:49
Message: <3C4AE250.E178B2E0@ndh.net>
Anton Sherwood schrieb:

> Any GIMP mavens here?  Is there a way to threshold one image against
> another?
>

Er... what is a "maven"? I tried to look it up in my Oxford Advanced
Learner's Dictionary of Current English, but it's not listed there.

Is it something like a geek, or a nerd?

See you in Khyberspace -
http://www.geocities.com/electricafghan/index-e.html
Afghanistan Chronicle: http://www.ndh.net/home/bleimann/index-e.htm

Now playing: Solid Space (Jon Anderson)


Post a reply to this message

From: Ib Rasmussen
Subject: Re: nonperiodic contours
Date: 20 Jan 2002 11:01:30
Message: <3C4AE9F3.806247F2@ibras.dk>
Yadgar wrote:
> 
> Anton Sherwood schrieb:
> 
> > Any GIMP mavens here?  Is there a way to threshold one image against
> > another?
> >
> 
> Er... what is a "maven"? I tried to look it up in my Oxford Advanced
> Learner's Dictionary of Current English, but it's not listed there.
> 
> Is it something like a geek, or a nerd?

I didn't wonder about it, because I thought I knew what it meant (expert
or specialist), but you are right, it isn't in the English dictionaries.

However, I found this on the Net (at www.thefoodmaven.com): "Maven is a
Yiddish word that means connoisseur; in other words, a person who can
discern quality."

Obviously, we need a Yiddish dictionary, to follow this group :-)

/Ib


Post a reply to this message

From: Anton Sherwood
Subject: Re: nonperiodic contours
Date: 25 Jan 2002 00:17:35
Message: <3C50EC92.4473AC9B@pobox.com>

> Below version afaik gives in 3.5 the same result as above:
> 
> #declare tau = (1+sqrt(5))/2;
> #declare F0 = function{pattern{marble}}
> #declare F1 = function{pattern{marble scale tau-1}}
> #declare taumarble = function{(F0(x,y,z)+F1(x,y,z))/2 }

In 3.1, "marble" without a color_map gave something strange.

-- 
Anton Sherwood  --  http://www.ogre.nu/


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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