Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al

This is a discussion on Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al within the logo forums in Programming Languages category; 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@worldnet.nospam.att.net . This discussion reminds me of the old saw that when you acquire a brand new hammer everything looks like a nail. Do any of you have any evidence that programming with Logo will improve your thinking about any thing else? Dale PS Back to "standards" Try this code in MSWLogo and FMSLogo and tell me if you get the same answers. On my computer, but apparently not others, ...

Go Back   Application Development Forum > Programming Languages > logo

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 02-23-2008, 06:44 PM
John St. Clair
Guest
 
Default Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al

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@worldnet.nospam.att.net.


This discussion reminds me of the old saw that when you acquire a brand
new hammer everything looks like a nail.

Do any of you have any evidence that programming with Logo will improve
your thinking about any thing else?

Dale

PS Back to "standards"
Try this code in MSWLogo and FMSLogo and tell me if you get the same
answers. On my computer, but apparently not others, MSWLogo determines
the color of the pixels *under* the pen but FMSLogo determines the color
*of* the pen.

to aa
cs pu
fd 100
rt 90 fd 100
setpc [255 0 0]
setpensize[3 3]
pd bk 200
pu home
setpc [0 0 0]
setpensize[1 1]
pd fd 95
repeat 10[show pixel fd 1]
end

---
$ dale-reed@worldnet.att.net Seattle, Washington $

__._,_.___
LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum
Reply With Quote
  #2  
Old 02-23-2008, 06:51 PM
John St. Clair
Guest
 
Default Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al

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
jotape1960@yahoo.nospam.com.


--- In LogoForum@yahoogroups.com, "Dale Reed" <dale-reed@...> wrote:
>


>
> PS Back to "standards"
> Try this code in MSWLogo and FMSLogo and tell me if you get the

same
> answers.
> On my computer, but apparently not others, MSWLogo determines the

color of
> the pixels *under* the pen but FMSLogo determines the color *of*

the pen.
>
> to aa
> cs pu
> fd 100
> rt 90 fd 100
> setpc [255 0 0]
> setpensize[3 3]
> pd bk 200
> pu home
> setpc [0 0 0]
> setpensize[1 1]
> pd fd 95
> repeat 10[show pixel fd 1]
> end
>


Hi Dale!!!

I get a different behaviour too.

When I run the program with the original MSWLogo, I get the screen
background color under the turtle, because here PIXEL represents the
pixel color BEFORE the pen "writes" it:

[255 255 255]
[255 255 255]
[255 255 255]
[255 255 255]
[255 0 0]
[255 0 0]
[255 0 0]
[255 255 255]
[255 255 255]
[255 255 255]

When I run the program with FMSLogo, I get the turtle pen color
because here PIXEL represents the pixel color AFTER the pen "writes"
it:

[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]
[0 0 0]

???

I wonder if it was a bug in the original MSWLogo which was fixed
into FMSLogo, or It was right in the original and it's a bug in
the "new" version. ???

GOD BLESS YOU ALL!!!!!!!

Juan J. Paredes G.
From Curicó, Chile, South America, with love

__._,_.___
LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum
Reply With Quote
  #3  
Old 02-23-2008, 06:53 PM
John St. Clair
Guest
 
Default Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al

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
bgorman@kncell.nospam.org.


I do a bit of image manipulation, so I checked by running my program in
both MSWLogo and FMSLogo, and it works identically in both.

I do not use FD to move about, but FOR loops that control movement using
setxy.

Here's a sample, works with any .bmp file:

First load the pix and set variable "pixsize:
to getpix :filename
;Get the picture
;cs home
bitload :filename
; Get it's size
make "pixsize bitloadsize :filename
end

This is the main routine that loops through the image:
to pix :Type
; get size from :Pixsize
ht pu
make "xsiz first ixsize
make "ysiz second ixsize
make "newpxl []
for [x 0 :xsiz-1 1]~
*** [for [y :ysiz-1 0 -1]~
*** *** [DoPixel]]
end

to DoPixel
; inherit x & y
setxy :x :y
make "pxl pixel
; Transform
make "red first xl
make "grn second xl
make "blu third xl
;
; Transform the image
change :Type
make "newpxl (list :red :grn :blu)
setpixel :newpxl
end

Here's a sample Transformation - Reverse, which done twice restores the
original.
to change :type
if :type = "reverse [~
*** make "red 255 - :red
*** make "grn 255 - :grn
*** make "blu 255 - :blu
*** stop]
end

Utilities
to second :list
;output 2nd element
*** output first butfirst :list
end

to third :thing
*** output first butfirst butfirst :thing
end

Enjoy,
Bob
--
A ship in a harbor is safe. But that is not what ships were built for...
J.A. Shedd
http://www.KnCell.org
http://blog.KnCell.org

__._,_.___
LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum



> 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@worldnet.nospam.att.net.
>
>
> This discussion reminds me of the old saw that when you acquire a brand
> new hammer everything looks like a nail.
>
> Do any of you have any evidence that programming with Logo will improve
> your thinking about any thing else?
>
> Dale
>
> PS Back to "standards"
> Try this code in MSWLogo and FMSLogo and tell me if you get the same
> answers. On my computer, but apparently not others, MSWLogo determines
> the color of the pixels *under* the pen but FMSLogo determines the color
> *of* the pen.
>
> to aa
> cs pu
> fd 100
> rt 90 fd 100
> setpc [255 0 0]
> setpensize[3 3]
> pd bk 200
> pu home
> setpc [0 0 0]
> setpensize[1 1]
> pd fd 95
> repeat 10[show pixel fd 1]
> end
>
> ---
> $ dale-reed@worldnet.att.net Seattle, Washington $
>
> __._,_.___
> LogoForum messages are archived at:
> http://groups.yahoo.com/group/LogoForum

Reply With Quote
  #4  
Old 02-23-2008, 06:58 PM
John St. Clair
Guest
 
Default Re: [LogoForum] Re: Perspective mode, tests for compliance, standards et al

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@worldnet.nospam.att.net.


> 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/...ry1.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= ie )
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@worldnet.att.net Seattle, Washington $

__._,_.___
LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 02:25 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.