File:3 rotating rings.gif

From WikiEducator
Jump to: navigation, search
3_rotating_rings.gif(180 × 135 pixels, file size: 83 KB, MIME type: image/gif, looped, 9 frames, 0.9 s)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: An example of three rings in a Sonic the Hedgehog game, intended to supersede File:SonicRing.jpg in terms of illustration quality. NOTICE: This ring is NOT from the real Sonic game, it is a self-made fake image which is meant to look as the original.
Date
Source Own work
Author w:en:User:DavidHOzAu

rotierende sonic coins

Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 2.5 Generic, 2.0 Generic and 1.0 Generic license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.

Source code

Image generated using POV-Ray for Windows 3.6; resulting slides were converted to an animated GIF using GIMP 2.3.6.

rings.pov

//------------------------------------------------------------
// Copyright 2006 DavidHOzAu
//------------------------------------------------------------
// This work is licensed under the Creative Commons Attribution ShareAlike License. 
// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ 
//------------------------------------------------------------

#include "colors.inc"
#include "textures.inc"
#include "metals.inc"
#include "stones.inc"
#include "golds.inc"

global_settings {
  photons {
    count 2000
    autostop 0.5
    jitter .4
  }
  radiosity {
    normal on
    count 100
    recursion_limit 5
    error_bound 1
    low_error_factor 1
    brightness 1.5
  }
  ambient_light rgb 1/3
}

#declare seer = <4, 4, -9>;

camera {
        location  seer
        up <0, 1, 0>
        right <4/3, 0, 0>
        angle 34
        look_at   <0.75, 0.5, 0>
}     

light_source {
  <13, 13, -5>
  color rgb <1.4, 1.3, 1.2>
  fade_distance 15
  fade_power 2
  photons {
     refraction off
     reflection on
  }
  
  area_light <.4, 0, 0>, <0, 0, .4>, 5, 5
}

light_source {
  <20, 0, -5>
  color rgb 1
  fade_distance 15
  fade_power 2
  photons {
     refraction off
     reflection on
  }
  area_light <.4, 0, 0>, <0, 0, .4>, 5, 5
  shadowless
}

light_source {
  seer
  color rgb 1
  fade_distance 2
  fade_power 2
  photons {
     refraction off
     reflection on
  }
  shadowless
}

background {
  color 0
}'''para voce que tem os olhos redondos rssss'''

#declare MarbleFloorTex1 = texture {
  T_Grnt9
  finish {
    reflection 0.25
    ambient rgb 0.5
  }
  scale 10      
}
    
#declare MarbleFloorTex2 = texture {
  T_Stone10//T_Stone17
  //pigment { color Gray75 }
  finish {
    reflection 0.25
    ambient rgb 0.5
  }
  scale 10
}

// FloorBuilder
#macro FloorBuilder (vc, dm, nmx, nmz, sc, of)
  #local ix = 0;
  #while (ix < nmx)
    #local iz = 0;
    #while (iz < nmz)
      box {
          <ix*dm, -0.1, iz*dm>
          <(ix+1)*dm, 0, (iz+1)*dm>
          #if (mod(ix + iz, 2) = 0)
            texture {
              MarbleFloorTex1
              scale sc
              translate <of*ix*sc*dm, 0, of*iz*sc*dm>                            
            }
          #else
            texture {
              MarbleFloorTex2
              scale sc
              translate <of*ix*sc*dm, 0, of*iz*sc*dm>
            }
          #end
          translate <-nmx*dm/2, 0, -nmz*dm/2>
          translate vc
          photons {
             target
          }
      }
      #local iz = iz + 1;
      #end
    #local ix = ix + 1;
  #end
#end

FloorBuilder(<0, -10, 0>, 10, 100, 100, 15, 2)    

// Classic-style ring is an intersection of three torus
#macro SonicRing(d, r, f) 
  intersection {
    object {
      torus {
        d + (r*f*sqrt(3)/2), r
        sturm
      }
      translate -y*r*f/2
    } 
    object {
      torus {
        d + (r*f*sqrt(3)/2), r
        sturm
      }
      translate y*r*f/2
    }  
    object {
      torus {
        d-(r*f), r
        sturm
      }
    }
    rotate 90*z
  }
#end

#macro SonicRingRotate(d, r, f, a)
merge{
  SonicRing(d, r, f)
  scale 0.5
  rotate 180*y*(clock+a)
#end

#macro GlowRing(d, r, f, a, tr)
#local sinmul = 1/8*pow(f-sqrt(-3*pow(f,2)+4),2)*sqrt(3);
#local cosmul = sqrt(1 - pow(sinmul,2));
  object {
     SonicRingRotate(d, r, f, a)
    texture { 
       pigment {
         color <1.00, 1.0, 0.5>
       }
       finish {
         ambient <0.4, 0.3, 0.2>
       }
    }
    photons {
       target
       reflection on
    }
    translate tr
    
  }
#end

// Three rings in a row
GlowRing(2, 1, 0.25, 0.0, 0)
GlowRing(2, 1, 0.25, 0.0, <0, 0, 4>)
GlowRing(2, 1, 0.25, 0.0, <0, 0, 8>)

rings.ini

Final_Frame=9
Cyclic_Animation=on
Input_File_Name=ring.pov

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

24 December 2006

image/gif

7273bbf5196b672fae7d8ef14b03cbed1b3f338a

85,158 byte

0.9 second

135 pixel

180 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current23:12, 24 December 2006Thumbnail for version as of 23:12, 24 December 2006180 × 135 (83 KB)DavidHOzAu{{Information |Description='''en:''' An example of three rings in a Sonic the Hedgehog game, intended to supersede Image:SonicRing.jpg in terms of illustration quality. NOTICE: This ring is NOT from the real Sonic game, it is a self-made fake image w

The following page links to this file: