POV-Ray : Newsgroups : povray.text.scene-files : Music notes for MegaPov? ah well, anyhow... Server Time
31 Oct 2024 12:17:42 EDT (-0400)
  Music notes for MegaPov? ah well, anyhow... (Message 1 to 1 of 1)  
From: Bob Hughes
Subject: Music notes for MegaPov? ah well, anyhow...
Date: 2 Apr 2000 14:11:13
Message: <38e78d41@news.povray.org>
// Persistence of Vision Ray Tracer Scene Description File
// File: 4musicalnotes.pov
// Vers: MegaPov 0.4
// Desc: handwritten-like(?) musical notes. I have no idea what I'm doing, hope
you do  :-)
// Date: 00.25
// Auth: Bob Hughes
// Mail: inv### [at] aolcom?Subject=Pov-Scene


#version unofficial MegaPov 0.4;

// background {rgb 1}

#declare clock_type="O"
#include "clockmod.inc"
#declare MC=mclock;

light_source { <0,5,-55>, <1.5,1.25,1>}

#declare CamPos =
spline {
  cubic_spline
  0,<0,0,-30>
  .125,<-10,7.5,-20>
  .25,<-30,0,-15>
  .33,<-15,-5,-25>
  .5,<-5,0,-30>
  .67,<5,5,-20>
  .75,<15,0,-15>
  .875,<30,-2.5,-10>
  1,<10,0,-25>
}

#declare CamSee =
spline {
  cubic_spline
  0,<0,0,0>
  .125,<-5,-.25,-2.5>
  .25,<-7.5,0,7.5>
  .33,<-2.5,1,-2.5>
  .5,<0,0,2.5>
  .67,<0,0,0>
  .75,<-5,0,10>
  .875,<5,0,0>
  1,<2.5,0,2.5>
}

camera {
  location  CamPos(clock) // 0,0,-30>
  angle 75
  look_at   CamSee(clock) // .5, 0, 0>
  // rotate <MC*45,360*clock,0>
}

sky_sphere // evening
{
  pigment
  {
    gradient y
color_map { [0.0 color rgb<0.9,0.5,0.475>] [1.0 color rgb<0.2,0.45,0.65>] }
  }
}


#declare Note1=
sphere_sweep {
  b_spline_sphere_sweep,
   7,
  <0, 10, 0>, .5
  <0, 7.5, 0>, .5
  <0, 2.5, 0>, .5
  < 0, -2.5, 0>, .5
  < 0, -5, 0>, .5
  < -2.5, -7.5, 0>, 2
  < -5, -5, 0>, 3
 // sphere_sweep_depth_tolerance 1.0e-3
  scale <1,1,0.25>
}

#declare Note2=
sphere_sweep {
  b_spline_sphere_sweep,
   8,
  <0, 10, 0>, .5
  <0, 7.5, 0>, .5
  <0, 2.5, 0>, .5
  < 0, -2.5, 0>, .5
  < 0, -5, 0>, .5
  < 0, -7.5, 0>, .5
  < 3.3, -5, 0>, 2
  < 5, -2.5, 0>, 3
 // sphere_sweep_depth_tolerance 1.0e-3
  scale <1,1,0.25>
}

#declare Flag1=
sphere_sweep {
  b_spline_sphere_sweep,
   8,
  <3.3, -1, 0>, 0
  <2.5, 0, 0>, 0.1
  <3.3, 2, 0>, 0.25
  <4.5, 4, 0>, 0.33
  <2.5, 5.25, 0>, 0.75
  <1, 6, 0>, 0.67
  <0, 7, 0>, 0.5
  <0, 7.5, 0>, .5
 // sphere_sweep_depth_tolerance 1.0e-3
  scale <1,1,0.25>
}

#declare Flag2=
union {
        object {Flag1}
        object {Flag1
  translate -2.5*y
 }
}

#declare Flag3=
union {
        object {Flag1}
        object {Flag1
  translate -2.5*y
 }
        object {Flag1
  translate -5*y
 }
}

#declare MN1 =
spline {
  cubic_spline
  0,<0,0,0>
  .1,<0,0,0>
  .2,<1,0,0>
  .3,<0,0,0>
  .4,<0,0,0>
  .5,<1,0,0>
  .6,<0,0,0>
  .7,<0,0,0>
  .8,<1,0,0>
  .9,<0,0,0>
  1,<0,0,0>
}

#declare MN2 =
spline {
  cubic_spline
  0,<0,0,0>
  .15,<0,0,0>
  .25,<0,1,0>
  .35,<0,0,0>
  .4,<0,0,0>
  .45,<0,1,0>
  .6,<0,0,0>
  .75,<0,0,0>
  .9,<0,1,0>
  1,<0,0,0>
}

#declare MN3 =
spline {
  cubic_spline
  0,<0,0,0>
  .2,<0,0,0>
  .3,<0,0,1>
  .4,<0,0,0>
  .5,<0,0,0>
  .55,<0,0,1>
  .65,<0,0,0>
  .75,<0,0,0>
  .85,<0,0,1>
  .95,<0,0,0>
  1,<0,0,0>
}

#declare MN4 =
spline {
  cubic_spline
  0,<0,0,0>
  .075,<1,1,0>
  .3,<0,0,0>
  .45,<0,0,0>
  .5,<1,1,0>
  .65,<0,0,0>
  .7,<0,0,0>
  .95,<1,1,0>
  1,<0,0,0>
}

#declare Notes=
union {

union {
object {Note1}
object {Flag3}
 pigment {rgb MN1(clock)} finish {ambient 1 specular 1 roughness .009 phong .5
phong_size 123
  reflection 0 reflection_min .15 reflection_max .5
   }
         translate <15,-.5,0>
}

difference {
object {Note2}
sphere {0,1 scale <1.75,1.33,.33> rotate 40*z translate <2.75,-5.25,-.25>}
sphere {0,1 scale <1.75,1.33,.33> rotate 40*z translate <2.75,-5.25,.25>}
 pigment {rgb MN2(clock)} finish {ambient 1 specular 1 roughness .009 phong .5
phong_size 123
  reflection 0 reflection_min .15 reflection_max .5
  }
 translate <3.3,-4.5,0>
}

union {
object {Note1}
object {Flag1}
 pigment {rgb MN3(clock)} finish {ambient 1 specular 1 roughness .009 phong .5
phong_size 123
  reflection 0 reflection_min .15 reflection_max .5
  }
 translate <-5,-.5,0>
}

union {
object {Note2}
object {Flag2}
 pigment {rgb MN4(clock)} finish {ambient 1 specular 1 roughness .009 phong .5
phong_size 123
  reflection 0 reflection_min .15 reflection_max .5
  }
 translate <-15,5.5,0>
}

}

Notes

union {
cylinder {-x,x,1 scale <25,.5,.5> translate <0,10,.5>}
cylinder {-x,x,1 scale <25,.5,.5> translate <0,5,.5>}
cylinder {-x,x,1 scale <25,.5,.5> translate <0,0,.5>}
cylinder {-x,x,1 scale <25,.5,.5> translate <0,-5,.5>}
cylinder {-x,x,1 scale <25,.5,.5> translate <0,-10,.5>}
 pigment {rgb 0} finish {specular 1 roughness .0125 phong .5 phong_size 123
  reflection 0 reflection_min .15 reflection_max .5
 }
}

/*

//  Use the following to display the MUSIC.TTF font Ken Tyler has at his Links
web page

text {ttf "musical.ttf","abcdefghijklmnopqrstuv",.01,0 align_center
 pigment {rgb 0} finish {specular .25 roughness .025}
   scale 4 translate 7*y
}

text {ttf "musical.ttf","wxyz~!@#$%^&*()_+{}:<>?",.01,0 align_center
 pigment {rgb 0} finish {specular .25 roughness .025}
   scale 4 translate -2*y
}

text {ttf "musical.ttf","/.,';][=-0987654321`",.01,0 align_center
 pigment {rgb 0} finish {specular .25 roughness .025}
   scale 4 translate -11*y
}
*/


// omniVerse http://users.aol.com/persistenceofv/all.htm


Post a reply to this message

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