To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.build.sculptureOpen lugnet.build.sculpture in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Building / Sculpture / 925
924  |  926
Subject: 
Re: Post for David Winkler... The Stanford Bunny!!
Newsgroups: 
lugnet.build.sculpture, lugnet.org.us.sealug, lugnet.cad
Followup-To: 
lugnet.org.us.sealug
Date: 
Wed, 20 Jul 2005 02:35:08 GMT
Viewed: 
6909 times
  
In lugnet.announce.moc, Todd Kubo wrote:
Hello All!
Hey Check this out!! I'm posting for David V. Winkler, a quiet but very talented
builder in SEALUG.
Be sure to check out all the other stuff he's got in the brickshelf folder if
you haven't already seen it!
Cheers!

http://www.brickshelf.com/gallery/happyfrosh/StanfordBunny/abunny.png

The classic 3d test object, the Stanford Bunny!
Using the mesh distributed by the Stanford Computer Graphics Lab (
http://www-graphics.stanford.edu/ ) I produced this Lego sculpture that
just fits within a 32x32 baseplate using 991 pieces.

I have posted the LDRaw data, a PDF of instructions that I find simpler
to follow, and a PNG image of the finished bunny at
http://www.brickshelf.com/gallery/happyfrosh/StanfordBunny/

-dw

I was asked the following question:

     Wow!  How did you digitize the mesh into Lego units?  Did you do a "hit
test"
     on each vertext/face within lego units, or perhaps do a boolean subtract
     out of a composite lego 'block'?  Inquiring minds want to know! ;)

     ---Will

In response:


I used povray and rendered slices through the bunny.

For this to work the section
vertex_vectors {
35947,
<0.0378297, 0.12794, 0.00447467>,
...
<0.0400442, 0.15362, -0.00816685>
}
face_indices {
69451,
<21216, 21215, 20399>,
...
<17277, 17346, 17345>
}
Needs to be replaced with the actual vertex_vectors and face_indices of the
bunny.  It's a fairly simple transformation from the ply file format available
on the Stanford web site to this format.  Note that this technique will work
with any POV CSG object.

Render this as an animation for clock=frame=1 to clock=frame=25

Then shrink the images of the animation to 32x32 pixels. (matching up with the
LegoWidth declaration below) (LegoHeight could be replaced with 0.4 for plates).

Each frame of the animation is a Lego layer.

Place a lego block there if each pixel of each layer frame is more white than
black. (An easy way to do this is to use a graphics program to transform the
file to a text pbm format, which uses "1" and "0" for the two allowed colors
(black and white))

Begin pov code:

#version 3.5;

#include "colors.inc"
#include "math.inc"

global_settings {
  ambient_light rgb<1, 1, 1>
  assumed_gamma 1.0
}
#declare LegoWidth=32; // in studs
#declare LegoHeight=1.2;
#declare SceneWidth=0.1712689; // about the width of the mesh object // scene
will require 25 frames for LegoWidth of 32.
// scene will require 37 frames for LegoWidth of 48.

#declare orthoLookAt=<0, 0, 0>;

camera {
  orthographic
location   orthoLookAt+y*100
look_at    orthoLookAt
  right SceneWidth*x            // horizontal size of view
  up (SceneWidth*image_height/image_width)*y               // vertical size of
view
}

// ----------------------------------------
// CSG intersection, the common space where all the shapes meet intersection
{
#if (clock>=1)
box{<-1,-LegoHeight*(SceneWidth/LegoWidth),-1>,<1,0,1> translate
y*(0.0329874+clock*LegoHeight*(SceneWidth/LegoWidth))}
#end
mesh2 {
vertex_vectors {
35947,
<0.0378297, 0.12794, 0.00447467>,
...
<0.0400442, 0.15362, -0.00816685>
}
face_indices {
69451,
<21216, 21215, 20399>,
...
<17277, 17346, 17345>
}
inside_vector <0, 1, 0>
}
texture
{
// texture component
pigment {
color rgb <1,1,1>
}
finish {
  ambient White
}
}
translate <-0.0168404, 0, 0.00153695>
}



Message has 1 Reply:
  Re: Post for David Winkler... The Stanford Bunny!!
 
(...) I was asked the following question: David, I just caught your article on LUGNET about usingPov-Ray, I tried the code you had posted with a .ply Ihad and it didn't work, gave me errors on the textureand translate lines, is there any chance you (...) (16 years ago, 23-Nov-07, to lugnet.org.us.sealug)

Message is in Reply To:
  Post for David Winkler... The Stanford Bunny!!
 
Hello All! Hey Check this out!! I'm posting for David V. Winkler, a quiet but very talented builder in SEALUG. Be sure to check out all the other stuff he's got in the brickshelf folder if you haven't already seen it! Cheers! (URL) classic 3d test (...) (19 years ago, 12-Jul-05, to lugnet.announce.moc, lugnet.build.sculpture, lugnet.org.us.sealug, lugnet.cad)  

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR