No need to change it's size (each wall is the same size it always was).
It all has to do with how close your standing next to the object
(setturtle -1 position).
If you held a real checker board up to your nose it would be too
big. If you put it 20 feet away it would be to small.
Your actually standing (viewing) the object a little to the left
looking under it.
setturtle -1
setxyz -200 -200 200
setturtle 0
If you want to stand further away, no problem.
setturtle -1
setxyz -400 -400 400
setturtle 0
If you want to look at from the opposite side.
setturtle -1
setxyz 400 400 -400
setturtle 0
Or make a GIF movie with the viewpoint moving and
pan around.
Note that FILL is not completely 3D.
It knows where to position the FILL operation in 3D.
But the FILL action is still 2D (on a 3D drawing).
LABEL will work the same way.
Yehuda Katz wrote:
>
> George Mills wrote:
> >
> > And with just a couple rolls added look what you get.
>
> George,
>
> That left me open-mouthed. The checkered cube is extremely beautiful.
> You might want to reduce the size from 128 to a smaller value, to have a
> somewhat more managable cube. {In my original chessboard I gave the size
> 128 because it's a power of 2, to bypass rounding errors).
>
> > Note the BETA version did not have "Fill" 3D enabled yet.
> >
> > The original code was not orientation independent (i.e. it would not
> > work if you issued say a rt 5 before drawing it). I modified the code
> > to snapshot the orientation (heading) before starting and use the
> > difference.
>
> I noticed those modifications in MAIN and CHESS procedures.
>
> > Of course I MSWLogoized it to RGB.
> >
> > I also had a few rounding errors I'm working on which I worked
> > around.
> >
> > But the basicly the code still runs even when the turtle is standing
> > on his head :-)
>
> > =====================================
> > to chess :size :level
> > if :level<1[stop]
> > repeat 4[draw]
> > setfloodcolor ifelse 0=remainder round (heading-:startheading+360)
> 180[[255 0 0]][[0 0 0]]
> > fill_it
> > setpc [255 255 0] ; lines color
> > end
> >
> > to draw
> > fd :size rt 90
> > chess :size/2 :level-1
> > end
> >
> > to fill_it
> > pu rt 45 fd 10 pd
> > fill ; brown or blue
> > pu bk 10 lt 45 pd
> > end
> >
> > to main ; Chessboard
> > cs
> > perspective
> > setturtle -1
> > setxyz -200 -200 200
> > setturtle 0
> > make "startheading heading
> > chess 128 4
> > rr 90
> > make "startheading heading
> > chess 128 4
> > rt 90
> > lr 90
> > make "startheading heading
> > chess 128 4
> > end
> > =====================================
>
> Great job.
>
> I attach another '3-d' cube, done with plain-vanilla Logo.
>
> Enjoy,
>
> [[Yehuda]]
>
> ---------------------------------------------------------------
> [Image]
--
===============================================================
George Mills
email: mills@softronix.com
http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org. Mail
questions about the list administration to logofdn@gsn.org. To
unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home