POV-Ray : Newsgroups : povray.general : 35 mm film prospective view Server Time
25 Apr 2024 23:35:18 EDT (-0400)
  35 mm film prospective view (Message 1 to 6 of 6)  
From: isuc60
Subject: 35 mm film prospective view
Date: 23 Nov 2016 18:30:01
Message: <web.5836263b2ebb6aa7116828db0@news.povray.org>
Dear All,

I would like to  use Povray to draw old 35 mm films. Then I want to plot some
images in them. These films should be viewed from an angle, so the films go away
from the viewer, into future. I could not find a useful example how I can create
a shape.

I would appreciate it if you could give me some hints.

Best regards,

Guoping


Post a reply to this message

From: clipka
Subject: Re: 35 mm film prospective view
Date: 23 Nov 2016 18:43:41
Message: <583629ad$1@news.povray.org>
Am 24.11.2016 um 00:28 schrieb isuc60:
> Dear All,
> 
> I would like to  use Povray to draw old 35 mm films. Then I want to plot some
> images in them. These films should be viewed from an angle, so the films go away
> from the viewer, into future. I could not find a useful example how I can create
> a shape.
> 
> I would appreciate it if you could give me some hints.

Presuming you want the film to curl around a bit, I would recommend
using splines to define the basic contours of the film, and using a
scripted loop to create a mesh or a series of bicubic patches.


Post a reply to this message

From: Alain
Subject: Re: 35 mm film prospective view
Date: 24 Nov 2016 10:32:34
Message: <58370812$1@news.povray.org>

> Dear All,
>
> I would like to  use Povray to draw old 35 mm films. Then I want to plot some
> images in them. These films should be viewed from an angle, so the films go away
> from the viewer, into future. I could not find a useful example how I can create
> a shape.
>
> I would appreciate it if you could give me some hints.
>
> Best regards,
>
> Guoping
>
>
If a flat surface is enough, then you can use a thin box or a polygon 
that you create on the X-Y plane.
You apply your image to it using an image_map.
Finally, you tilt that away using rotate x*45, or any angle you may 
want. The angle is in degrees.


Alain


Post a reply to this message

From: isuc60
Subject: Re: 35 mm film prospective view
Date: 24 Nov 2016 19:50:05
Message: <web.583789959bdf54b5116828db0@news.povray.org>
Dear Alain and clipka,

Thank you very much!

Here is my first try, but I do not understand why my middle polygons become
grey. For single, it is white. Very strange.
Do you have any idea why?


// Persistence Of Vision raytracer version 3.5 sample file.
//
// -w320 -h240
// -w800 -h600 +a0.3

global_settings { assumed_gamma 1.0 }

#include "colors.inc"           // Standard colors library
#include "shapes.inc"           // Commonly used object shapes
#include "textures.inc"         // LOTS of neat textures.  Lots of NEW textures.

//#include "arrow.inc"
//#include "smallarrow.inc"



#declare Camera_1 = camera {                     // modifieddiagonal view
                             angle 9
                             location  <40.0 ,40.5 ,55.0>
                             right     x*image_width/image_height
                             look_at   <0.3 , 1.5 ,-0.2>
                           }

camera{Camera_1}


// Light source

//light_source {<-30, 11, +20>  color White  }
//light_source {< 31, 12, -20>  color White  }
//light_source {< 32, 11, -20>  color LightGray }

light_source{<1500,2500,-2500> color White}


// sky -------------------------------------------------------------------
sky_sphere{ pigment{ gradient <0,1,0>
                     color_map{ [0   color rgb<1,1,1>         ]//White
                                [0.4 color rgb<1,1,1>]//~Navy
                                [0.6 color rgb<1,1,1>]//<0.14,0.14,0.56>]//~Navy
                                [1.0 color rgb<1,1,1>         ]//White
                              }
                     scale 2 }
           } // end of sky_sphere
//------------------------------------------------------------------------



#include "rdgranit.map"
#declare Pink_Gran_Texture =
texture {
   pigment {
      granite
      color_map { M_RedGranite }
      scale 0.4
      }
   finish {
      specular 0.75
      roughness 0.0085
      ambient 0.15
      reflection 0.2
   }
}



//#declare Phase = union{

/*

union {
//   sphere {<0, 0, 0>, 1.75}
box { <-4,1,-4>,<4,1.4,4>}
//pigment{checker color rgb < 0.03, 0.5, 0.>, color White}
pigment{checker color rgb < 0.05, 0., 0.35>, color White}
//box { <1,.050,3> , <-4,-0.05,-3>}
//   texture { Pink_Gran_Texture scale 0.55 }
//   rotate y*45
}

*/

#declare al=4;


/*

polygon {
    4,
    <0,4, 0>, <0,4, 1>, <1, 4,1>, <1,4, 0>
    texture {
      finish { ambient 1 diffuse 0 }
      pigment {  color rgb<1,0,0> }
     }
    //scale and rotate as needed here
  }
*/



#declare al=4;

#declare w=1.2;

polygon {
    4,
    < 5,0, -w>, <-5, 0,-w>,  <-5,0, w>,<5,0, w>
    texture {
      finish { ambient 1 diffuse 0 }
      pigment {  color rgb<0.1,0.1,0.1> }
     }
    //scale and rotate as needed here
  }




#declare h=0.8;

#declare wid=2;

#declare ls=-3;
#declare le=ls+wid;

#declare Index = 0;
#while(Index <= 5)

polygon {
    4,
    < ls+Index,0, -h>, <le+Index, 0,-h>,  <le+Index,0, h>,<ls+Index,0, h>
    texture {
      finish { ambient 1 diffuse 0 }
      pigment {  color rgb<1,1,1> }
     }
    //scale and rotate as needed here
  }

  #declare Index = Index + 2.5;
#end

//==================end===========================




Thanks a lot!

Guoping


Alain <kua### [at] videotronca> wrote:

> > Dear All,
> >
> > I would like to  use Povray to draw old 35 mm films. Then I want to plot some
> > images in them. These films should be viewed from an angle, so the films go away
> > from the viewer, into future. I could not find a useful example how I can create
> > a shape.
> >
> > I would appreciate it if you could give me some hints.
> >
> > Best regards,
> >
> > Guoping
> >
> >
> If a flat surface is enough, then you can use a thin box or a polygon
> that you create on the X-Y plane.
> You apply your image to it using an image_map.
> Finally, you tilt that away using rotate x*45, or any angle you may
> want. The angle is in degrees.
>
>
> Alain


Post a reply to this message

From: omniverse
Subject: Re: 35 mm film prospective view
Date: 24 Nov 2016 23:25:01
Message: <web.5837bc5d9bdf54b59c5d6c810@news.povray.org>
"isuc60" <isu### [at] gmailcom> wrote:
> Here is my first try, but I do not understand why my middle polygons become
> grey. For single, it is white. Very strange.
> Do you have any idea why?

Coincident surfaces.

If you put translate -y/1000 (or as little as one hundred trillionths?) into
first polygon where it says "scale and rotate as needed here" it will move
enough to separate the surfaces yet still be together.

Or... here's another way to go about making a film strip, curves away like you
asked about before. Requires you to replace testpic1-4 with your own images. And
this was just a quick hack, the curve isn't refined at all.

/* FILM STRIP PICTURES */

#version 3.7;

global_settings {
 assumed_gamma 1
 max_trace_level 4
}

background {rgb 0.5}

light_source {-z*20, 1}

camera {
 location <2,2,-15>
 look_at <2,-5,0>
 up y
 right image_width/image_height*x
 angle 60
}

// bicubic patch curving film strip 4 frames
union {
 // based on bicubic_patch examples from documentation
#declare B11=<0,-0.75,3>; #declare B12=<1,-0.33,3>; //
#declare B13=<2,0.25,3>; #declare B14=<3,0.5,3>; // row 1

#declare B21=<0,-0.75,2>; #declare B22=<1,-0.33,2>; //
#declare B23=<2,0.25,2>; #declare B24=<3,0.5,2>; // row 2

#declare B31=<0,-0.75,1>; #declare B32=<1,-0.33,1>; //
#declare B33=<2,0.25,1>; #declare B34=<3,0.5,1>; // row 3

#declare B41=<0,-0.75,0>; #declare B42=<1,-0.33,0>; //
#declare B43=<2,0.25,0>; #declare B44=<3,0.5,0>; // row 4

bicubic_patch {
   type 1 flatness 0.001
   u_steps 4 v_steps 4
   uv_vectors
   <0,0> <1,0> <1,1> <0,1>
   B11, B12, B13, B14
   B21, B22, B23, B24
   B31, B32, B33, B34
   B41, B42, B43, B44
   uv_mapping
   texture {
      pigment {
       image_map
       {
        jpeg "testpic1"
        filter all 0.8
        interpolate 2
       }
       scale <1,-1,1> // inside-out?
      }
      finish {ambient 0.1 emission 0.2
       diffuse 1 specular 0.8 roughness 0.001}
   }
  // hollow on
}

#declare R11=B14; #declare R12=<4,0.25,3>;     //
#declare R13=<5,0,3>; #declare R14=<5.75,-0.33,3>; // row 1

#declare R21=B24; #declare R22=<4,0.25,2>;     //
#declare R23=<5,0,2>; #declare R24=<5.75,-0.33,2>; // row 2

#declare R31=B34; #declare R32=<4,0.25,1>;     //
#declare R33=<5,0,1>; #declare R34=<5.75,-0.33,1>; // row 3

#declare R41=B44; #declare R42=<4,0.25,0>;     //
#declare R43=<5,0,0>; #declare R44=<5.75,-0.33,0>; // row 4

#declare R12=B14+(B14-B13);
#declare R22=B24+(B24-B23);
#declare R32=B34+(B34-B33);
#declare R42=B44+(B44-B43);

bicubic_patch {
   type 1 flatness 0.001
   u_steps 4 v_steps 4
   uv_vectors
   <0,0> <1,0> <1,1> <0,1>
   R11, R12, R13, R14
   R21, R22, R23, R24
   R31, R32, R33, R34
   R41, R42, R43, R44
   uv_mapping
   texture {
      pigment {
       image_map
       {
        jpeg "testpic2"
        filter all 0.8
        interpolate 2
       }
       scale <1,-1,1> // inside-out?
      }
      finish {ambient 0.1 emission 0.2
       diffuse 1 specular 0.8 roughness 0.001}
   }
  // hollow on
}

#declare G11=R14; #declare G12=<6.5,-0.75,3>;     //
#declare G13=<7.25,-1.5,3>; #declare G14=<7.75,-2.25,3>; // row 1

#declare G21=R24; #declare G22=<6.5,-0.75,2>;     //
#declare G23=<7.25,-1.5,2>; #declare G24=<7.75,-2.25,2>; // row 2

#declare G31=R34; #declare G32=<6.5,-0.75,1>;     //
#declare G33=<7.25,-1.5,1>; #declare G34=<7.75,-2.25,1>; // row 3

#declare G41=R44; #declare G42=<6.5,-0.75,0>;     //
#declare G43=<7.25,-1.5,0>; #declare G44=<7.75,-2.25,0>; // row 4

#declare G12=R14+(R14-R13);
#declare G22=R24+(R24-R23);
#declare G32=R34+(R34-R33);
#declare G42=R44+(R44-R43);

bicubic_patch {
   type 1 flatness 0.001
   u_steps 4 v_steps 4
   uv_vectors
   <0,0> <1,0> <1,1> <0,1>
   G11, G12, G13, G14
   G21, G22, G23, G24
   G31, G32, G33, G34
   G41, G42, G43, G44
   uv_mapping
   texture {
      pigment {
       image_map
       {
        jpeg "testpic3"
        filter all 0.8
        interpolate 2
       }
       scale <1,-1,1> // inside-out?
      }
      finish {ambient 0.1 emission 0.2 diffuse 1 specular 0.8 roughness 0.001}
   }
  // hollow on
}

#declare C11=G14; #declare C12=<8,-3,3>;     //
#declare C13=<8.25,-4,3>; #declare C14=<8,-5,3>; // row 1

#declare C21=G24; #declare C22=<8,-3,2>;     //
#declare C23=<8.25,-4,2>; #declare C24=<8,-5,2>; // row 2

#declare C31=G34; #declare C32=<8,-3,1>;     //
#declare C33=<8.25,-4,1>; #declare C34=<8,-5,1>; // row 3

#declare C41=G44; #declare C42=<8,-3,0>;     //
#declare C43=<8.25,-4,0>; #declare C44=<8,-5,0>; // row 4

#declare C12=G14+(G14-G13);
#declare C22=G24+(G24-G23);
#declare C32=G34+(G34-G33);
#declare C42=G44+(G44-G43);

bicubic_patch {
   type 1 flatness 0.001
   u_steps 4 v_steps 4
   uv_vectors
   <0,0> <1,0> <1,1> <0,1>
   C11, C12, C13, C14
   C21, C22, C23, C24
   C31, C32, C33, C34
   C41, C42, C43, C44
   uv_mapping
   texture {
      pigment {
       image_map
       {
        jpeg "testpic4"
        filter all 0.8
        interpolate 2
       }
       scale <1,-1,1> // inside-out?
      }
      finish {ambient 0.1 emission 0.2
       diffuse 1 specular 0.8 roughness 0.001}
   }
  // hollow on
}

rotate y*90 // turn sideways so film strip curves away/toward camera

interior {ior 1.001}
} // end union


Post a reply to this message

From: isuc60
Subject: Re: 35 mm film prospective view
Date: 25 Nov 2016 09:00:00
Message: <web.583843bf9bdf54b5116828db0@news.povray.org>
Dear omniverse,

Povray forever!!!

You solved it!!!

Yes, translate -y/1000.


Thank you so much!!!

Guoping


"omniverse" <omn### [at] charternet> wrote:
> "isuc60" <isu### [at] gmailcom> wrote:
> > Here is my first try, but I do not understand why my middle polygons become
> > grey. For single, it is white. Very strange.
> > Do you have any idea why?
>
> Coincident surfaces.
>
> If you put translate -y/1000 (or as little as one hundred trillionths?) into
> first polygon where it says "scale and rotate as needed here" it will move
> enough to separate the surfaces yet still be together.
>
> Or... here's another way to go about making a film strip, curves away like you
> asked about before. Requires you to replace testpic1-4 with your own images. And
> this was just a quick hack, the curve isn't refined at all.
>
> /* FILM STRIP PICTURES */
>
> #version 3.7;
>
> global_settings {
>  assumed_gamma 1
>  max_trace_level 4
> }
>
> background {rgb 0.5}
>
> light_source {-z*20, 1}
>
> camera {
>  location <2,2,-15>
>  look_at <2,-5,0>
>  up y
>  right image_width/image_height*x
>  angle 60
> }
>
> // bicubic patch curving film strip 4 frames
> union {
>  // based on bicubic_patch examples from documentation
> #declare B11=<0,-0.75,3>; #declare B12=<1,-0.33,3>; //
> #declare B13=<2,0.25,3>; #declare B14=<3,0.5,3>; // row 1
>
> #declare B21=<0,-0.75,2>; #declare B22=<1,-0.33,2>; //
> #declare B23=<2,0.25,2>; #declare B24=<3,0.5,2>; // row 2
>
> #declare B31=<0,-0.75,1>; #declare B32=<1,-0.33,1>; //
> #declare B33=<2,0.25,1>; #declare B34=<3,0.5,1>; // row 3
>
> #declare B41=<0,-0.75,0>; #declare B42=<1,-0.33,0>; //
> #declare B43=<2,0.25,0>; #declare B44=<3,0.5,0>; // row 4
>
> bicubic_patch {
>    type 1 flatness 0.001
>    u_steps 4 v_steps 4
>    uv_vectors
>    <0,0> <1,0> <1,1> <0,1>
>    B11, B12, B13, B14
>    B21, B22, B23, B24
>    B31, B32, B33, B34
>    B41, B42, B43, B44
>    uv_mapping
>    texture {
>       pigment {
>        image_map
>        {
>         jpeg "testpic1"
>         filter all 0.8
>         interpolate 2
>        }
>        scale <1,-1,1> // inside-out?
>       }
>       finish {ambient 0.1 emission 0.2
>        diffuse 1 specular 0.8 roughness 0.001}
>    }
>   // hollow on
> }
>
> #declare R11=B14; #declare R12=<4,0.25,3>;     //
> #declare R13=<5,0,3>; #declare R14=<5.75,-0.33,3>; // row 1
>
> #declare R21=B24; #declare R22=<4,0.25,2>;     //
> #declare R23=<5,0,2>; #declare R24=<5.75,-0.33,2>; // row 2
>
> #declare R31=B34; #declare R32=<4,0.25,1>;     //
> #declare R33=<5,0,1>; #declare R34=<5.75,-0.33,1>; // row 3
>
> #declare R41=B44; #declare R42=<4,0.25,0>;     //
> #declare R43=<5,0,0>; #declare R44=<5.75,-0.33,0>; // row 4
>
> #declare R12=B14+(B14-B13);
> #declare R22=B24+(B24-B23);
> #declare R32=B34+(B34-B33);
> #declare R42=B44+(B44-B43);
>
> bicubic_patch {
>    type 1 flatness 0.001
>    u_steps 4 v_steps 4
>    uv_vectors
>    <0,0> <1,0> <1,1> <0,1>
>    R11, R12, R13, R14
>    R21, R22, R23, R24
>    R31, R32, R33, R34
>    R41, R42, R43, R44
>    uv_mapping
>    texture {
>       pigment {
>        image_map
>        {
>         jpeg "testpic2"
>         filter all 0.8
>         interpolate 2
>        }
>        scale <1,-1,1> // inside-out?
>       }
>       finish {ambient 0.1 emission 0.2
>        diffuse 1 specular 0.8 roughness 0.001}
>    }
>   // hollow on
> }
>
> #declare G11=R14; #declare G12=<6.5,-0.75,3>;     //
> #declare G13=<7.25,-1.5,3>; #declare G14=<7.75,-2.25,3>; // row 1
>
> #declare G21=R24; #declare G22=<6.5,-0.75,2>;     //
> #declare G23=<7.25,-1.5,2>; #declare G24=<7.75,-2.25,2>; // row 2
>
> #declare G31=R34; #declare G32=<6.5,-0.75,1>;     //
> #declare G33=<7.25,-1.5,1>; #declare G34=<7.75,-2.25,1>; // row 3
>
> #declare G41=R44; #declare G42=<6.5,-0.75,0>;     //
> #declare G43=<7.25,-1.5,0>; #declare G44=<7.75,-2.25,0>; // row 4
>
> #declare G12=R14+(R14-R13);
> #declare G22=R24+(R24-R23);
> #declare G32=R34+(R34-R33);
> #declare G42=R44+(R44-R43);
>
> bicubic_patch {
>    type 1 flatness 0.001
>    u_steps 4 v_steps 4
>    uv_vectors
>    <0,0> <1,0> <1,1> <0,1>
>    G11, G12, G13, G14
>    G21, G22, G23, G24
>    G31, G32, G33, G34
>    G41, G42, G43, G44
>    uv_mapping
>    texture {
>       pigment {
>        image_map
>        {
>         jpeg "testpic3"
>         filter all 0.8
>         interpolate 2
>        }
>        scale <1,-1,1> // inside-out?
>       }
>       finish {ambient 0.1 emission 0.2 diffuse 1 specular 0.8 roughness 0.001}
>    }
>   // hollow on
> }
>
> #declare C11=G14; #declare C12=<8,-3,3>;     //
> #declare C13=<8.25,-4,3>; #declare C14=<8,-5,3>; // row 1
>
> #declare C21=G24; #declare C22=<8,-3,2>;     //
> #declare C23=<8.25,-4,2>; #declare C24=<8,-5,2>; // row 2
>
> #declare C31=G34; #declare C32=<8,-3,1>;     //
> #declare C33=<8.25,-4,1>; #declare C34=<8,-5,1>; // row 3
>
> #declare C41=G44; #declare C42=<8,-3,0>;     //
> #declare C43=<8.25,-4,0>; #declare C44=<8,-5,0>; // row 4
>
> #declare C12=G14+(G14-G13);
> #declare C22=G24+(G24-G23);
> #declare C32=G34+(G34-G33);
> #declare C42=G44+(G44-G43);
>
> bicubic_patch {
>    type 1 flatness 0.001
>    u_steps 4 v_steps 4
>    uv_vectors
>    <0,0> <1,0> <1,1> <0,1>
>    C11, C12, C13, C14
>    C21, C22, C23, C24
>    C31, C32, C33, C34
>    C41, C42, C43, C44
>    uv_mapping
>    texture {
>       pigment {
>        image_map
>        {
>         jpeg "testpic4"
>         filter all 0.8
>         interpolate 2
>        }
>        scale <1,-1,1> // inside-out?
>       }
>       finish {ambient 0.1 emission 0.2
>        diffuse 1 specular 0.8 roughness 0.001}
>    }
>   // hollow on
> }
>
> rotate y*90 // turn sideways so film strip curves away/toward camera
>
> interior {ior 1.001}
> } // end union


Post a reply to this message

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