POV-Ray : Newsgroups : povray.general : CNRS Server Time: 22 Nov 2019 05:58:26 GMT
  CNRS (Message 1 to 8 of 8)  
From: Francois LE COAT
Subject: CNRS
Date: 19 Oct 2019 15:55:39
Message: <5dab31fb$1@news.povray.org>
Hi,

Is it possible to translate the following equation with POV-Ray ?

	<https://imaginary.github.io/80-cnrs/>

I don't know how to begin ... It's an interesting problem :-)

Best regards,

-- 
François LE COAT
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/


Post a reply to this message

From: Bald Eagle
Subject: Re: CNRS
Date: 19 Oct 2019 18:05:00
Message: <web.5dab504846c52bde4eec112d0@news.povray.org>
Francois LE COAT <lec### [at] atariorg> wrote:

Hello friend,

Try the following and let me know how it works out   :)




// rearranging a bit and deleting extra unnecessary parentheses gives:

( ((x+2*a)²+(y+2*b)²-1)²     - c+2*z²+d*(y+2*b)² ) *
( ((x+2*a)²+(y-2*b)²-1)²     - c+2*z²+d*(y-2*b)² )  *
( ((x-2*a)²+(y/(2*b+1))²-1)² - c+2*z²+d*(y/(2*b+1))²) -
10*e


#declare e = exp(1);//2.71828182845904523536028747135266249775724709369996;
// or #include "consts.inc"

// then just convert to SDL syntax (* this is untested)
#declare Equation = function (x, y, z, a, b, c, d) {
( pow (pow (x+2*a, 2) + pow (y+2*b, 2)-1, 2)     - c+pow(2*z, 2) + d*pow (y+2*b,
2) ) *
( pow (pow (x+2*a, 2) + pow (y-2*b, 2)-1, 2)     - c+pow(2*z, 2) + d*pow (y-2*b,
2) ) *
( pow (pow (x-2*a, 2) + pow (y(2*b+1), 2)-1, 2)  - c+pow(2*z, 2) + d*pow
(y/(2*b+1), 2) ) -
10 * e}

// Define a, b, c, and d
// and then plug it into an isosurface declaration,
// preferably with the max_gradient estimatiing equation
// to speed things up a bit.
// render with a very low accuracy to start:  maybe 0.1

// I'd also keep lighting and textures the simplest possible, perhaps only using
a
// finish {specular 0.2} or 0.4


Post a reply to this message

From: Bald Eagle
Subject: Re: CNRS
Date: 19 Oct 2019 18:50:00
Message: <web.5dab5a0e46c52bde4eec112d0@news.povray.org>
OK, so I couldn't help myself.
Here's a working scene with good starting values for a through d, and some
initial ideas about what those parameters affect.




// Bill Walker "Bald Eagle" October 2019
// scene for Francois LE COAT
// based on equation for the SURFER application at:
// https://imaginary.github.io/80-cnrs/

#version 3.8;
global_settings {assumed_gamma 1.0 }
#include "colors.inc"
#include "functions.inc"
#include "math.inc"

camera {
 location <0, 6.5, -15>
 //location <0, 10, 3>
 right x*image_width/image_height
 up y
 look_at <0, -2, 0>

 //rotate -y*155
}

sky_sphere {pigment {rgb 1}}

light_source {<2, 5, -10> rgb 1}
//light_source {<-10, 8, -1> rgb 0.8} // fill light

#declare Tan = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {specular 0.2}}
#declare Tan2 = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {diffuse 0.7
specular 0.2 reflection 0.02}}
#declare Gray = texture {pigment {rgb 0.5}}
#declare Gray2 = texture {pigment {rgb 0.5}finish {diffuse 0.7 specular 0.2
reflection 0.02}}

#declare Shade = 1;
#declare   _Red = texture {pigment {rgb <1, 0, 0>*Shade} finish {diffuse 0.7}}
#declare _Green = texture {pigment {rgb <0, 1, 0>*Shade} finish {diffuse 0.7}}
#declare  _Blue = texture {pigment {rgb <0, 0, 1>*Shade} finish {diffuse 0.7}}

#declare Checker = texture {pigment {checker rgb 0 rgb 1} scale 2 finish
{diffuse 1}}

//##########POV-RAY###############Bald
Eagle##############2019###################

#declare Square = union {
 triangle {<-5, 0, -5>, <-5, 0, 5>, <5, 0, -5>}
 triangle {<5, 0, -5>, <-5, 0, 5>, <5, 0, 5> }
 texture {Checker}
}

#declare Axes =
 union {
  #declare Line = 0.1;
  #declare Base = Line*3;
  #declare Length = 3.5;
  #declare Ext = 0.5;
  cylinder {<0, 0, 0>, <Length, 0, 0>, Line texture {_Red}}
   cone {<Length, 0, 0>, Base, <Length+Ext, 0, 0>, 0 texture {_Red}}
   text {ttf "timrom.ttf", "X", 0.02, 0.0 texture {_Red}
    translate <2, -1.125, 0>
   }

  cylinder {<0, 0, 0>, <0, Length, 0>, Line texture {_Green}}
   cone {<0, Length, 0>, Base, <0, Length+Ext, 0>, 0 texture {_Green}}
  cylinder {<0, 0, 0>, <0, 0, Length>, Line texture {_Blue}}
   cone {<0, 0, Length>, Base, <0, 0, Length+Ext>, 0 texture {_Blue}}
  //no_shadow
 }

//##########POV-RAY###############Bald
Eagle##############2019###################

object {Square translate -y*4}
object {Axes}


/* rearranging a bit and deleting extra unnecessary parentheses gives:

( ((x+2*a)²+(y+2*b)²-1)²     - c+2*z²+d*(y+2*b)² ) *
( ((x+2*a)²+(y-2*b)²-1)²     - c+2*z²+d*(y-2*b)² )  *
( ((x-2*a)²+(y/(2*b+1))²-1)² - c+2*z²+d*(y/(2*b+1))²) -
10*e
*/

#declare e = exp(1);//2.71828182845904523536028747135266249775724709369996;
// or #include "consts.inc"

// then just convert to SDL syntax (* this is untested)
#declare Equation = function (x, y, z, a, b, c, d) {
( pow (pow (x+2*a, 2) + pow (y+2*b, 2)-1, 2)     - c+pow(2*z, 2) + d*pow (y+2*b,
2) ) *
( pow (pow (x+2*a, 2) + pow (y-2*b, 2)-1, 2)     - c+pow(2*z, 2) + d*pow (y-2*b,
2) ) *
( pow (pow (x-2*a, 2) + pow (y/(2*b+1), 2)-1, 2)  - c+pow(2*z, 2) + d*pow
(y/(2*b+1), 2) ) -
10 * e}

// And then plug it into an isosurface declaration,
// preferably with the max_gradient estimatiing equation
// to speed things up a bit.
// render with a very low accuracy to start:  maybe 0.1

// I'd also keep lighting and textures the simplest possible, perhaps only using
a
// finish {specular 0.2} or 0.4


  #declare Range = 1;
  #declare Whole = yes;
  #declare Label = no;
  #declare Gradient = 50;
  #declare Min_factor= 0.6;

  #declare a = 0.8; // affects letter separation
  #declare b = 0.55; // affects "girdle" of the 8
  #declare c = 0.45; // affects top and bottom of numbers
  #declare d = 0.45; // also affects top and bottom of numbers

  isosurface {

    function {Equation (x, y, z, a, b, c, d)}
    //open
    threshold 0.5
    //max_gradient 10
    accuracy     0.01
    evaluate Gradient*Min_factor,  sqrt(Gradient/(Gradient*Min_factor)),  min
(0.7, 1.0)
    contained_by {box {<-3, -2, -1>*Range, <Whole*3, 2.3, 1>*Range}}
      texture {Tan} //interior_texture {Gray}
      //texture {Tex1}
     scale 1
    }


Post a reply to this message

From: Francois LE COAT
Subject: Re: CNRS
Date: 19 Oct 2019 19:52:36
Message: <5dab6984$1@news.povray.org>
Hi,

I use POV-Ray 3.7, but I rendered the image successfully with it, here :

	<http://eureka.atari.org/cnrs.png>

It's great, and you're really an advanced user, congratulations ! This
"80" shape was designed for today, October 19th 2019, the eighty
anniversary of the CNRS (centre national de la recherche scientifique)
the french institute for research.

It's really kind of you to have worked on this, because we can
celebrate this anniversary worldwide :-) Thanks to you !

I'm really amazed and I will study what you've done closer ...

Bald Eagle writes:
> // Bill Walker "Bald Eagle" October 2019
> // scene for Francois LE COAT
> // based on equation for the SURFER application at:
> //https://imaginary.github.io/80-cnrs/
>
> #version 3.8;
> global_settings {assumed_gamma 1.0 }
> #include "colors.inc"
> #include "functions.inc"
> #include "math.inc"
>
> camera {
>   location <0, 6.5, -15>
>   //location <0, 10, 3>
>   right x*image_width/image_height
>   up y
>   look_at <0, -2, 0>
>
>   //rotate -y*155
> }
>
> sky_sphere {pigment {rgb 1}}
>
> light_source {<2, 5, -10> rgb 1}
> //light_source {<-10, 8, -1> rgb 0.8} // fill light
>
> #declare Tan = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {spec
ular 0.2}}
> #declare Tan2 = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {dif
fuse 0.7
> specular 0.2 reflection 0.02}}
> #declare Gray = texture {pigment {rgb 0.5}}
> #declare Gray2 = texture {pigment {rgb 0.5}finish {diffuse 0.7 specul
ar 0.2
> reflection 0.02}}
>
> #declare Shade = 1;
> #declare   _Red = texture {pigment {rgb <1, 0, 0>*Shade} finish {diff
use 0.7}}
> #declare _Green = texture {pigment {rgb <0, 1, 0>*Shade} finish {diff
use 0.7}}
> #declare  _Blue = texture {pigment {rgb <0, 0, 1>*Shade} finish {diff
use 0.7}}
>
> #declare Checker = texture {pigment {checker rgb 0 rgb 1} scale 2 fin
ish
> {diffuse 1}}
>
> //##########POV-RAY###############Bald
> Eagle##############2019###################
>
> #declare Square = union {
>   triangle {<-5, 0, -5>, <-5, 0, 5>, <5, 0, -5>}
>   triangle {<5, 0, -5>, <-5, 0, 5>, <5, 0, 5> }
>   texture {Checker}
> }
>
> #declare Axes =
>   union {
>    #declare Line = 0.1;
>    #declare Base = Line*3;
>    #declare Length = 3.5;
>    #declare Ext = 0.5;
>    cylinder {<0, 0, 0>, <Length, 0, 0>, Line texture {_Red}}
>     cone {<Length, 0, 0>, Base, <Length+Ext, 0, 0>, 0 texture {_Red}}
>     text {ttf "timrom.ttf", "X", 0.02, 0.0 texture {_Red}
>      translate <2, -1.125, 0>
>     }
>
>    cylinder {<0, 0, 0>, <0, Length, 0>, Line texture {_Green}}
>     cone {<0, Length, 0>, Base, <0, Length+Ext, 0>, 0 texture {_Green}}

>    cylinder {<0, 0, 0>, <0, 0, Length>, Line texture {_Blue}}
>     cone {<0, 0, Length>, Base, <0, 0, Length+Ext>, 0 texture {_Blue}}
>    //no_shadow
>   }
>
> //##########POV-RAY###############Bald
> Eagle##############2019###################
>
> object {Square translate -y*4}
> object {Axes}
>
>
> /* rearranging a bit and deleting extra unnecessary parentheses gives:
>
> ( ((x+2*a)²+(y+2*b)²-1)²     - c+2*z²+d*(y+2*b)² ) *
> ( ((x+2*a)²+(y-2*b)²-1)²     - c+2*z²+d*(y-2*b)² )  *
> ( ((x-2*a)²+(y/(2*b+1))²-1)² - c+2*z²+d*(y/(2*b+1))²) -
> 10*e
> */
>
> #declare e = exp(1);//2.718281828459045235360287471352662497757247093
69996;
> // or #include "consts.inc"
>
> // then just convert to SDL syntax (* this is untested)
> #declare Equation = function (x, y, z, a, b, c, d) {
> ( pow (pow (x+2*a, 2) + pow (y+2*b, 2)-1, 2)     - c+pow(2*z, 2) + d*po
w (y+2*b,
> 2) ) *
> ( pow (pow (x+2*a, 2) + pow (y-2*b, 2)-1, 2)     - c+pow(2*z, 2) + d*po
w (y-2*b,
> 2) ) *
> ( pow (pow (x-2*a, 2) + pow (y/(2*b+1), 2)-1, 2)  - c+pow(2*z, 2) + d*p
ow
> (y/(2*b+1), 2) ) -
> 10 * e}
>
> // And then plug it into an isosurface declaration,
> // preferably with the max_gradient estimatiing equation
> // to speed things up a bit.
> // render with a very low accuracy to start:  maybe 0.1
>
> // I'd also keep lighting and textures the simplest possible, perhaps o
nly using
> a
> // finish {specular 0.2} or 0.4
>
>
>    #declare Range = 1;
>    #declare Whole = yes;
>    #declare Label = no;
>    #declare Gradient = 50;
>    #declare Min_factor= 0.6;
>
>    #declare a = 0.8; // affects letter separation
>    #declare b = 0.55; // affects "girdle" of the 8
>    #declare c = 0.45; // affects top and bottom of numbers
>    #declare d = 0.45; // also affects top and bottom of numbers
>
>    isosurface {
>
>      function {Equation (x, y, z, a, b, c, d)}
>      //open
>      threshold 0.5
>      //max_gradient 10
>      accuracy     0.01
>      evaluate Gradient*Min_factor,  sqrt(Gradient/(Gradient*Min_factor)
),  min
> (0.7, 1.0)
>      contained_by {box {<-3, -2, -1>*Range, <Whole*3, 2.3, 1>*Range}}
>        texture {Tan} //interior_texture {Gray}
>        //texture {Tex1}
>       scale 1
>      }
>

-- 
François LE COAT
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/


Post a reply to this message

From: Bald Eagle
Subject: Re: CNRS
Date: 19 Oct 2019 22:20:01
Message: <web.5dab8b7746c52bde4eec112d0@news.povray.org>
Francois LE COAT <lec### [at] atariorg> wrote:
> Hi,
>
> I use POV-Ray 3.7, but I rendered the image successfully with it, here :
>
>  <http://eureka.atari.org/cnrs.png>

Yes, excellent - and now you have a nice scene to use with other isosurface
equations  :)

> It's great, and you're really an advanced user, congratulations !

I'm getting there.  "Experienced", maybe.   "Advanced"...  I think I still have
a few more years to go, and a lot more reading "under the hood" until I can
start to play at the level some of the other folks do.
But thank you for the compliment.  :)

> This
> "80" shape was designed for today, October 19th 2019, the eighty
> anniversary of the CNRS (centre national de la recherche scientifique)
> the french institute for research.

Very nice.  It was pretty neat to read the description of how they came up with
the equation based originally on a torus, and then using some extra math to
perform a union.
I have been learning a lot from the ray-marching folks, and need to return there
to work out some more fun tools.
http://iquilezles.org/www/index.htm


> It's really kind of you to have worked on this, because we can
> celebrate this anniversary worldwide :-) Thanks to you !
>
> I'm really amazed and I will study what you've done closer ...


It was fairly easy, since the equation didn't need much "unraveling" and it was
pretty much one equation with 3 variations.
Then I just plugged it into an existing scene that I made for the purpose.

It was a lot easier then some past work I've done, and I failed to mention that
if you expand all of the terms, or plug the equation into a website that will do
that for you (there are several) - then you can render this as a polynomial {}
object in POV-Ray.


See:
http://news.povray.org/povray.binaries.images/thread/%3Cweb.59eaa80bc23a6d95cafe28e0%40news.povray.org%3E/?ttop=428294&
toff=250

http://news.povray.org/povray.advanced-users/thread/%3Cweb.59e76275a367ac6c437ac910%40news.povray.org%3E/

http://news.povray.org/povray.binaries.utilities/thread/%3Cweb.59e8fd04c28e2cfdc437ac910%40news.povray.org%3E/


Post a reply to this message

From: Le Forgeron
Subject: Re: CNRS
Date: 21 Oct 2019 17:30:20
Message: <5dadeb2c$1@news.povray.org>
Le 19/10/2019 à 17:55, Francois LE COAT a écrit :
> Hi,
> 
> Is it possible to translate the following equation with POV-Ray ?
> 
>     <https://imaginary.github.io/80-cnrs/>
> 
> I don't know how to begin ... It's an interesting problem :-)
> 
> Best regards,
> 

Equation is:

((((x+2*a)²+(y+2*b)²-1)²-c+2*z²+d*(y+2*b)²))*((((x+2*a)²+(y-2*b)²-1)²-c+2*z²+d*(y-2*b)²))*((((x-2*a)²+(y/(2*b+1))²-1)²-c+2*z²+d*(y/(2*b+1))²))-10*e

a, b, c, d & e are the sliders, but I cannot get their values from the page.

Yet, the "i" link open a subpage with

((((x+1)²+(y+1)²-1)²-1/2+2*z²+1/2*(y+1)²))*
((((x+1)²+(y-1)²-1)²-1/2+2*z²+1/2*(y-1)²))*
((((x-3/2)²+(y/2)²-1)²-1/2+2*z²+1/2*(y/2)²))-1

which is fine enough to ask wolfram to expand to get a polynomial
expression;

81/4 x^4 y^4 z^2 + 12 x^4 z^4 + 8 x^3 z^4 + 21/2 x^2 y^6 z^2 + 18 x^2
y^2 z^4 + 94 x^2 z^4 + 11 x y^6 z^2 + 26 x y^2 z^4 + 2 x z^4 + (9 y^8
z^2)/4 - (11 y^6 z^2)/8 + (33 y^4 z^4)/4 + 55 y^2 z^4 + 8 z^6 + (49
z^4)/4 + ... + x^12 + 2 x^11 - (17 x^10)/2 - (55 x^9)/2 - (47 x^8)/16 +
(157 x^7)/2 + (427 x^6)/4 + (37 x^5)/2 - (565 x^4)/8 - (129 x^3)/2 - (75
x^2)/4 + x - 12 y^2 + 1/16
(84 terms)

And it is just a transcription away from povray SDL with either poly syntax

http://wiki.povray.org/content/Reference:Poly

(good luck with the ordering of the coefficients) or polynomial syntax
(same object, easier to input)

http://wiki.povray.org/content/Documentation:Tutorial_Section_3.2#Polynomial_made_easy

You can of course experiment more with wolfram, keeping a to e if you dare.


Post a reply to this message

From: Bald Eagle
Subject: Re: CNRS
Date: 21 Oct 2019 17:50:01
Message: <web.5dadef3446c52bde4eec112d0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> a, b, c, d & e are the sliders, but I cannot get their values from the page.

Yeah - I tried looking through the page source to see if the initial slider
values were in there anywhere - but no.  :|


> which is fine enough to ask wolfram to expand to get a polynomial
> expression;
>
> 81/4 x^4 y^4 z^2 + 12 x^4 z^4 + 8 x^3 z^4 + 21/2 x^2 y^6 z^2 + 18 x^2
> y^2 z^4 + 94 x^2 z^4 + 11 x y^6 z^2 + 26 x y^2 z^4 + 2 x z^4 + (9 y^8
> z^2)/4 - (11 y^6 z^2)/8 + (33 y^4 z^4)/4 + 55 y^2 z^4 + 8 z^6 + (49
> z^4)/4 + ... + x^12 + 2 x^11 - (17 x^10)/2 - (55 x^9)/2 - (47 x^8)/16 +
> (157 x^7)/2 + (427 x^6)/4 + (37 x^5)/2 - (565 x^4)/8 - (129 x^3)/2 - (75
> x^2)/4 + x - 12 y^2 + 1/16
> (84 terms)
>
> And it is just a transcription away from povray SDL with either poly syntax

> (good luck with the ordering of the coefficients)

Indeed, which is why I wrote that spreadsheet   :D

The strangest thing I found, was that when I opened the page, copied the
equation, and pasted it into SURFER, I get the (!) error indicator.   I have
corresponded with the folks over there once or twice about that, but it didn't
appear as though I was going to get very far.   Which is a shame - it seems to
be a very nice rapid-visualization and development application for polynomial
equations.


Post a reply to this message

From: Francois LE COAT
Subject: Re: CNRS
Date: 23 Oct 2019 14:59:16
Message: <5db06ac4$1@news.povray.org>
Hi,

Bald Eagle writes:
> The strangest thing I found, was that when I opened the page, copied th
e
> equation, and pasted it into SURFER, I get the (!) error indicator.   I
 have
> corresponded with the folks over there once or twice about that, but it
 didn't
> appear as though I was going to get very far.   Which is a shame - it s
eems to
> be a very nice rapid-visualization and development application for poly
nomial
> equations.

I also tested modelling the "80" shape from the CNRS anniversary, with
MathMod, with the help from its author Taha Abderrahman and it gives :

	<http://eureka.atari.org/mathmod.png>

The eighty anniversary of the institute was celebrated worldwide :-)

Best regards,

-- 
François LE COAT
Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/


Post a reply to this message

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