Just fo fun...

Just fo fun...

Post by bbomber » Sat, 14 Jun 1997 04:00:00



This is fun for beginners
like me...it reminds me of the
kid's Spirograph toy, and it
helps get acquinted with
color maps!
POV
//------------------------------------------------------------------
#include "colors.inc"

#declare Pigm = pigment {
   spiral2 5
   color_map {
      [0.00 color rgb <1, 0.25, 0.25>]
      [0.33 color rgb <1, 1, 0.25>]
      [0.50 color rgb <0.25, 1, 0.25>]
      [0.66 color rgb <0.25, 0.25, 1>]
      [1.00 color rgb <1, 0.25, 0.25>]
   }
  }
camera {
   location <0, 0, -25>
   look_at <0, 0, 0>

Quote:}

light_source
{
  <0,0,-5>
  color rgb <1,1,1>
  spotlight
  translate <40, 80, -40>
  point_at <0, 0, 0>
  radius 5
  tightness 50
  falloff 8
Quote:}

plane {z, 15 texture  {
    Pigm scale 5 finish{
    reflection .05
    ambient .8
    diffuse 0.7
    phong 1.0 phong_size 90}

  scale <2.0, 2.0, 2.0>
  translate <9.5, 0.0, 4.25>
  }

Quote:}

//------------------------------------------------------------------
 
 
 

1. Box Filter FUN FUN FUN...

Hey Guys,

I'm trying to implement a box filter line drawing algorithm and i'm
having some difficulties. basically my problem is with finding the
area under a 1-pixel wide line. usually in the worst case it cover 3
adjacent pixels at given x coordinate that is on the line segment.

i'm wondering if there is a general formula based on the angle the
line intersects the pixels giving the area.

maybe i'm way off track here.. can anyone help?

another thought i had was to draw line segments between all the
intersection points of the 1-pixel wide line and a given x value..
this would split up the area into triangles.. and then using the cross
product to calculate the areas and add them up,, but this seems to me
a wasteful way of doing it..

any input would be greatly appreciated..

thanks

2. Help: Gaussian Filtering!

3. Fun, oh fun: Menger sponges

4. I've just added Victorian tubes to my site

5. help on history fo graphics files

6. joining multiple flics to one file?

7. Suggested platform fo Pov-Ray

8. Height of point in triangle

9. OpenInventor Region fo Interest

10. Great oppertunity fo someone in the netherlands