

|
 |
| Programming > Logo > Re: [LogoForum]... |
|
| << Topic |
< Post |
Post 3 of 4 Topic 1570 of 1588
|
Post > |
Topic >> |
Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al
by "John St. Clair" <john.stclair@[EMAIL PROTECTED]
>
Feb 23, 2008 at 11:58 PM
| The message below is being cross-posted from the LogoForum. Please
reply here at comp.lang.logo and it will be cross-posted back to the
LogoForum. The original author of this message is
dale-reed@[EMAIL PROTECTED]
> I get a different behaviour too.
Hey Juan. David, Mike and I are working on it.
Both MSWLogo and FMSLogo determines the color of the pixel under the pen.
But unfortunately(in my opinion) David says that "FD 1 draws two dots,
one
at each end point"
hence the turtle is contaminating its path ahead in FMSLogo but not in
MSWLogo. David said we had a go-around over this issue on the LogoForum
awhile back resulting in him making this difference between MSW and FMS.
What I am really trying to do is test out Andreas' aUCBLogo(you should
see
the beautiful 3D Moire patterns Mike is making!) with an oldie but
goodie
Buffon code I list below. This one works in MSWLogo, now works with
slight
changes in FMSLogo, and works with considerable changes in aUCBLogo.
Dale
to aaa :number
;
;Try erns aaa 100
;
;Deriving Pi: Buffon's Needle Method
;http://www.angelfire.com/wa/hurben/buff.html
;http://forum.swarthmore.edu/dr.math/problems/garry1.31.96.html
;PI = 2N/C
;N=Number of needle throws
;C=Number of line crossings
;
cs ht
make "cont 1
lines -300 -400
repeat :number[needle]
make "pie 2 * :number / :cont
(print "number= :number "count= :cont "PI= :pie )
end
to calc
make "cont :cont + 1
setpencolor [0 0 0]
fd 2
setpencolor [0 255 0]
end
to lines :xxx :yyy
setpencolor [0 0 0]
rt 90
repeat 6[pu localmake "yyy :yyy + 100 setxy :xxx :yyy pd fd 600]
end
to needle
setpencolor [255 0 0]
pu
setxy -200 + random 400 -200 + random 400
pd
setheading random 360
repeat 100[fd 1 if pixel = [0 0 0] [calc]]
end
Make "cont 69
Make "pie 2.89855072463768
---
$ dale-reed@[EMAIL PROTECTED]
Seattle, Washington $
__._,_.___
LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum


|
4 Posts in Topic:
|
"John St. Clair" |
2008-02-23 23:44:57 |
|
"John St. Clair" |
2008-02-23 23:51:47 |
|
"John St. Clair" |
2008-02-23 23:58:09 |
|
"John St. Clair" |
2008-02-23 23:53:36 |
|
Post A Reply:

|
|
|
|