D. Edward Mitchell 16:00, 14 April 2020 (UTC) Hello World!    groupKOS Developer Share —usually UNDER CONSTRUCTION

Hyperfine Newton's Rings Fractal Moire Pattern Generator

From groupKOS Developer Share
Jump to navigation Jump to search


Hello World! Hello. Are you there?

Let me out!

Snips and clips for reorder and expansion

Visualizing the hyperfine computer model of Newton's rings

To visualize the incredible shrinking Newton's rings computer model, picture slices of black and gold paper stacked alternately.  Carve the black/gold paper stack into a sphere.  The paper layers form surface lines that are like latitude lines on a globe.  The poles of the top-most and bottom-most paper layers will be circles; dots.  
A polar view of the spherical paper stack, from above a dot, reveals the image of the base pattern —Newton's rings moire generator in the computer model.


To make a time-line of shrinking scale, the computer model makes each black/gold layer a bit thinner for each image frame generated in the time-line.

The black/gold layer stack shrinks in height, and more layers occupy the sphere. The surface latitude lines grow finer to a limit of the machine resolution. The images in this rendering generator contain several million layers. The layers, or rings on the surface, become hyper-fine.

Aim

This page intends to document a fractal phenomenon when pixalation-sampling a computer-model of a sphere textured with hyperfine lines in the surface texture as latitude lines.

The 'surprise' deep inside simulated Newton's rings interference patterns is a perfect circle that appears and expands in a sea of chaotic fractal changes.  Even when the model was set to the machine resolution, while the fractal patterns of Newton's ring moire were 'fractal dust', per se, yet I saw a blurred-circle appear during an animation run deep in the fractal dust around 10^(-23):1 interference ratio.  Ish. Don't quote my memory :)  please.  This was ten years ago.  
As the deep moire generator made long slow tightening of the patterns in the quilt of flashing dots, a new 'epoch' in the fractal-regularity is first observed dramatically as if a lens were placed over the round image, and the center were magnified.  The magnified center flashing-dot-quilt fairly exploded outward sending a wave through the evolving fractal patterns. 

POVRay source code for generating 20,000 fractal moire patterns by pixelation of hyperfine Newton's rings

To begin automatic 'clocked generaton of an image sequence in POVRay, open this file, and copy the line of code (without the //) into the 'command window' of the POVRay application (above the edit window). Click the 'Run' button (or Alt-g) and wait several hours for 20k image files. I configure POVRay to output PNG image formats to file, to afford lossless image transfer to animated GIFs or video editors.

Download the free, open-source POVRay raytracer here: https://www.povray.org/download/

18 October 2020 (UTC) You too can max your hard drive capacity!
   The resident Developer at this altitude uses Irfanview for a fast-viewer, to implement a redneck video by holding down the right arrow in Irfanview when viewing images in a folder of 20K image files

// POVRay source code - download POVRay raytracer from povray.org
//
// File: newton's_rings_fractal_moire_.pov
//
// The Hyperfine Newton's Rings Fractal Moire Pattern Generator
// Copyright Don Mitchell 2020
// MIT license granted to compliant developers.  Use the source code per your fancy, but maintain a citation trail throughout use and alteration.

// Animation parameters - 19999 frames (These produce clocked-animation-frames to file when pasted (without //) into the 'command line' text-box above the POVRay editor.  
// Then click Run. And wait. And wait.

// +SF1 +EF19999 +KFI1 +KFF19999 +W1000 +H1000 -A +STP1

#version 3.7;
global_settings {
    max_trace_level 10 // Reflection levels before blackness.   
    assumed_gamma 1.2
    charset utf8
    // used in global_settings, sets an overall brightness/ambient light level in the scene
    ambient_light color rgb <1,1,1> * 1.9
    } 

#declare txtr1   = texture { pigment { color rgb<1,0,0> } finish{ diffuse 0.3 ambient 0.0 specular 0.6 reflection { .9 metallic } conserve_energy }
                                  }

#declare cameraLocation = <1,1,1>*.6;
#declare cameraLocation = <0,1,.0001>*1.05;

#declare cameraLook_At = <0,0,0>;
#declare cameraZoom =100 - (frame_number/final_frame)*100;
#declare cameraZoom = 1 + pow(2,frame_number);
#declare cameraZoom = 1 + frame_number*pow(2,-3);
#declare cameraZoom = 1 + 2 * (frame_number/final_frame);
#declare cameraZoom = 1;
#declare cameraSky = y;        
#declare cameraAspectRatio = image_width/image_height;

#declare cameraDirection=vnormalize(cameraLook_At-cameraLocation);      
#declare cameraRight=vnormalize(vcross(cameraSky, cameraDirection));    
#declare cameraUp=vnormalize(vcross(cameraDirection, cameraRight));     
#declare cameraTransform = transform { // A vector toward the camera.
                matrix <
                    cameraRight.x, cameraRight.y, cameraRight.z,
                    cameraUp.x, cameraUp.y, cameraUp.z,
                    cameraDirection.x, cameraDirection.y, cameraDirection.z,
                    cameraLocation.x, cameraLocation.y, cameraLocation.z
                >
    }

#declare cameraRight=vnormalize(vcross(cameraSky,cameraDirection)); // to the right
#declare cameraUp=vnormalize(vcross(cameraDirection,cameraRight));       // camera up
#declare cameraTransform = transform { matrix < cameraRight.x, cameraRight.y, cameraRight.z,
                                                cameraUp.x, cameraUp.y, cameraUp.z,
                                                cameraDirection.x, cameraDirection.y, cameraDirection.z,
                                                cameraLocation.x, cameraLocation.y, cameraLocation.z
                                       > }

#macro consoleObject (Object, Position, Spacing, Confine, Scaling)
   #local Obj_Max = max_extent(Object);
   #local Obj_Min = min_extent(Object);
   #local Obj_Cen = (Obj_Max+Obj_Min)/2;
   #local Obj_Dim = (Obj_Max-Obj_Min)/2;
   #local Pos = (Position-0.5)*2;
   #local Pos = ( +<Pos.x*cameraAspectRatio/2,Pos.y/2,cameraZoom>
                  +( -Obj_Cen -Pos*(Obj_Dim+Spacing) ) * Confine );
   object {
      Object
      no_shadow     // shouldn't cast shadows in the scene
      no_reflection // shouldn't be reflected in scene elements
      translate Pos
      scale Scaling
      transform {cameraTransform}
   }
#end

camera {
    direction cameraDirection*cameraZoom
    right cameraRight*cameraAspectRatio
    up cameraUp
    sky cameraSky
    location cameraLocation
}
   
light_source { 
    cameraLocation
    color 1
    parallel
    point_at 0
    shadowless
    rotate y*0
    }              
    
background{0}  


// 1000 x 1000
#declare startScale =  .000005;            // 5*pow(10,-5)
#declare endScale   =  .0000042;           // 1*pow(10,-6); 

#declare patternScale = startScale + (endScale-startScale) * ((frame_number)/(final_frame));
#declare patternScale = startScale + (endScale-startScale) * clock; //((frame_number)/(final_frame));

//#declare patternScale = .0000005;

// Define the texture colors for visual pattern contrast.
#declare stripeColorDark  = rgb<0,0,0>;  // Black. 
#declare stripeColorLight = rgb<.7,.7,0>;     // White.
                                
#declare gradientVector = cameraLocation;   // The vector direction of texture stripes.

#declare txtrStripes = texture 
                       { pigment{ 
                            gradient gradientVector
                            
                            scale patternScale  // color map scale
                            color_map{ [ 0.0 color stripeColorLight ]
                                       [ 0.5 color stripeColorLight ]
                                       [ 0.5 color stripeColorDark  ]
                                       [ 1.0 color stripeColorDark  ] } } // end pigment
                         //normal  { bumps 0.5 scale  05 }
                         finish  { phong 1 reflection 0.00 }
                       } // end of texture

union{
    #if(0)
        cylinder{0,-x*2,.005 pigment{rgb<1,0,0>}}
        cylinder{0,-y*2,.005 pigment{rgb<0,1,0>}}                     
        cylinder{0,-z*2,.005 pigment{rgb<0,0,1>}}
    #end
    sphere {                      
        0,1/2   
        hollow
        texture{ txtrStripes }        
    }
    //Axis_Rotate_Trans(1,y)
    rotate x*0
    clipped_by{plane{cameraLocation,0}} // Clip back hemisphere for visual contrast.
    
}                        
#declare black =  <1,1,1>*.2;
consoleObject ( text { internal 2, concat("Spherical Moire"), 0.1, <0,0>
                       scale 0.027 pigment {color black} finish {ambient 1 diffuse 0} },
                <0,1>, <.02,.01>, true, 0 )
consoleObject ( text {internal 3, concat("Pattern scale ", str(patternScale,20,20)), 0.1, <0,0>
                       scale 0.027 pigment {color black} finish {ambient 1 diffuse 0} },
                <0,0>, <.02,.01>, true, 0 )
               
consoleObject ( text { internal 2, concat("Frame ", str(frame_number,3,0), " of ", str(final_frame,3,0)), 0.1, <0,0>
                       scale 0.027 pigment {color black} finish {ambient 1 diffuse 0} },
                <0,.033>, <.02,.01>, true, 0 )
consoleObject ( text { internal 2, concat("Image size ", str(image_width,4,0), "x", str(image_height,3,0)), 0.1, <0,0>
                       scale 0.027 pigment {color black} finish {ambient 1 diffuse 0} },
                <1,0>, <.02,.01>, true, 0 )