| 
  | 
I plugged a prompt into the AI at work, just to see what sort of quality the
code and algorithms the thing spit out - and they're not all that terrible.
So I got some Ford Circles worked out (not using inversion).
Now, even this small experiment taught me some things.
spherical warp requires "orientation" and "dist_exp" to work properly,
especially as an interior_texture - otherwise you just get bad results.
And somehow, there may be a bug somewhere, or I'm just picking up some oddity in
the way the scene elements interact with each other - because I'm getting odd
"checkering" on that left-hand large sphere.   The crackle normal gets
flattened/canceled out.
If I remove the large, enclosing checkered sphere, it goes away.
Enjoy.
// ------------------------------------------------------------------------
#version 3.8;
global_settings {
 assumed_gamma 1.0
}
//#default {finish {emission 1}}
#declare E = 0.00001;
camera {
 location <0.5, 0.5, -1.75>
 right x*image_width/image_height
 up y
 look_at <0.5, 0.5, 0>
}
//sky_sphere {pigment {rgb 1}}
#declare BW = pigment_map
{
 [0 rgb 0]
 [1 rgb 1]
}
sphere {0, 1000 texture {pigment {checker rgb 0 rgb 1 scale x*0.5 warp
{spherical orientation y dist_exp 0.75} scale 1 }} } //interior_texture {pigment
{checker  scale 1 }} }
light_source {<5, 5, -50> rgb 1}
#declare Line = 0.001;
#declare Seed1 = seed (123);
#declare Seed2 = seed (456123);
#declare Seed3 = seed (456123789);
#macro FordCircle (p, q, mode)
 #local R1 = rand (Seed1);
 #local R2 = rand (Seed2);
 #local R3 = rand (Seed3);
 #local Color = <R1, R2, R3>;
 #local Radius = 1 / (2*pow(q,2));
 #local Center = <p/q, Radius, 0>;
 #switch (mode)
 #case (0)
  torus {Radius, Line pigment {rgb y} rotate x*90 translate Center}
  torus {Radius, Line pigment {rgb y} rotate x*90 translate <1, -1, 1>*Center
translate y*1}
 #break
 #case (1)
  disc {Center, z, Radius, 0 pigment {rgb Color}}
  disc {Center, z, Radius, 0 pigment {rgb Color} translate <0, 1-Radius*2, 0>}
 #break
 #case (2)
  sphere {Center, Radius texture {pigment {rgb Color} normal {crackle scale 0.01
bump_size 2} finish {specular 0.4}} }
  sphere {Center, Radius texture {pigment {rgb Color} normal {crackle scale
0.01} finish {specular 0.4}} translate <0, 1-Radius*2, 0>}
 #break
 #end
#end
#macro gcd (a, b)
 #if (b = 0)
  #local Result = a;
 #else
  #local Result = gcd (b, mod (a, b));
 #end
 Result
#end
#declare max_q = 10;
#for (q, 1, max_q)
 #for (p, 0, q)
  #if (gcd (p, q) = 1)
   FordCircle (p, q, 2)
  #end
 #end
#end
 Post a reply to this message 
 
Attachments: 
Download 'fordcircles_ai.png' (824 KB)
 
  
Preview of image 'fordcircles_ai.png'
   
   
 | 
  |