









 
 




 
 


Hi,
Is it possible to translate the following equation with POVRay ?
<https://imaginary.github.io/80cnrs/>
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


 
 




 
 


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)²+(y2*b)²1)²  c+2*z²+d*(y2*b)² ) *
( ((x2*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 (y2*b, 2)1, 2)  c+pow(2*z, 2) + d*pow (y2*b,
2) ) *
( pow (pow (x2*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


 
 




 
 


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/80cnrs/
#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}}
//##########POVRAY###############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
}
//##########POVRAY###############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)²+(y2*b)²1)²  c+2*z²+d*(y2*b)² ) *
( ((x2*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 (y2*b, 2)1, 2)  c+pow(2*z, 2) + d*pow (y2*b,
2) ) *
( pow (pow (x2*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


 
 




 
 


Hi,
I use POVRay 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/80cnrs/
>
> #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}}
>
> //##########POVRAY###############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
> }
>
> //##########POVRAY###############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)²+(y2*b)²1)²  c+2*z²+d*(y2*b)² ) *
> ( ((x2*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 (y2*b, 2)1, 2)  c+pow(2*z, 2) + d*po
w (y2*b,
> 2) ) *
> ( pow (pow (x2*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


 
 




 
 


Francois LE COAT <lec### [at] atariorg> wrote:
> Hi,
>
> I use POVRay 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 raymarching 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 POVRay.
See:
http://news.povray.org/povray.binaries.images/thread/%3Cweb.59eaa80bc23a6d95cafe28e0%40news.povray.org%3E/?ttop=428294&
toff=250
http://news.povray.org/povray.advancedusers/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


 
 




 
 


Le 19/10/2019 Ã 17:55, Francois LE COAT a Ã©critÂ :
> Hi,
>
> Is it possible to translate the following equation with POVRay ?
>
> Â Â Â Â <https://imaginary.github.io/80cnrs/>
>
> 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)Â²+(y2*b)Â²1)Â²c+2*zÂ²+d*(y2*b)Â²))*((((x2*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)Â²+(y1)Â²1)Â²1/2+2*zÂ²+1/2*(y1)Â²))*
((((x3/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


 
 




 
 


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 rapidvisualization and development application for polynomial
equations.
Post a reply to this message


 
 




 
 


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 rapidvisualization 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


 
 




 

