Re: Yertle the Turtle

2017-02-02 Thread Jim Hurley via use-livecode
I had been promoting Turtle Graphics in RR/LC for many years. Here are 4 implementation of Turtle Graphics in LC: http://jamesphurley.com/Revolution.html Jim > > Message: 19 > Date: Mon, 30 Jan 2017 22:20:10 +0200 > From: Richmond Mathewson

Re: Yertle the Turtle

2017-02-01 Thread Alejandro Tejada via use-livecode
Hi All, Remember that Jim Hurley wrote a book: http://jamesphurley.com/RunRev/TurtlePhysicsText.doc and many stacks about Turtle Graphics: http://jamesphurley.com/Revolution.html Al ___ use-livecode mailing list use-livecode@lists.runrev.com Please

RE: Yertle the Turtle

2017-01-31 Thread Ralph DiMola via use-livecode
>Mike Wrote: >Ah. Its sub pixel positioning. (a rose by any other name wouldn't be as alliterative as a ppp name) I banged my head against a wall for days trying to get smooth shading of 3d objects correct. (assembler on a 1980's ECL super computer) until the light went on and I used center pixel

Re: Yertle the Turtle

2017-01-31 Thread Mike Bonner via use-livecode
nvm. ignore me. :) Something else entirely. (but the whole idea of tracking the coords separately still applies) (goes to bed) On Tue, Jan 31, 2017 at 2:57 PM, Mike Bonner wrote: > Ah. Its sub pixel positioning. (a rose by any other name wouldn't be as > alliterative as a

Re: Yertle the Turtle

2017-01-31 Thread Mike Bonner via use-livecode
Ah. Its sub pixel positioning. (a rose by any other name wouldn't be as alliterative as a ppp name) On Tue, Jan 31, 2017 at 2:35 PM, Mike Bonner wrote: > Yeah, I think this is due to that change a while back (the partial pixel > positioning stuff) it doesn't throw an error

Re: Yertle the Turtle

2017-01-31 Thread Mike Bonner via use-livecode
Yeah, I think this is due to that change a while back (the partial pixel positioning stuff) it doesn't throw an error in your face if you set to a decimal coord anymore. > > Apparently fractional coordinates work fine, rounded reasonably well - > this works: > >set the left of btn 1 to

Re: Yertle the Turtle

2017-01-31 Thread hh via use-livecode
> Colin H. wrote: > I’m sure any system would not attempt to parse an infinite number of decimal > places. The turtle would probably be placed at 1.41421356237 pixels. If you > want to try more accurately than that, here’s the first million decimal > places: >

Re: Yertle the Turtle

2017-01-31 Thread Colin Holgate via use-livecode
I’m sure any system would not attempt to parse an infinite number of decimal places. The turtle would probably be placed at 1.41421356237 pixels. If you want to try more accurately than that, here’s the first million decimal places: https://apod.nasa.gov/htmltest/gifcity/sqrt2.1mil > On Jan

Re: Yertle the Turtle

2017-01-31 Thread Richmond Mathewson via use-livecode
If sqrt(2) is a bonkers number does anyone know how LOGO manages this? Richmond. On 1/31/17 5:36 pm, hh via use-livecode wrote: Richmond wrote: The problem is that (as far as I am aware) LiveCode cannot move objects for fractions of pixels. Even if it could, this would be not enough, because

Re: Yertle the Turtle

2017-01-31 Thread Richard Gaskin via use-livecode
Quentin Long wrote: > Suggestion for RM to try: Don't fuss about non-integer points—do all > the necessary calculations "under the hood", and just let point- > coördinates be assigned the resulting non-integer numbers as needed. > With any luck, LC will make this "just work" on your screen.

Re: Yertle the Turtle

2017-01-31 Thread Quentin Long via use-livecode
Suggestion for RM to try: Don't fuss about non-integer points—do all the necessary calculations "under the hood", and just let point-coördinates be assigned the resulting non-integer numbers as needed. With any luck, LC will make this "just work" on your screen. "Bewitched" + "Charlie's

Re: Yertle the Turtle

2017-01-31 Thread Richard Gaskin via use-livecode
Richmond Mathewson wrote: > Being a fan of Seymour Papert . . . > > I thought I'd try and implement turtle graphics in Livecode. Have you seen Jim Hurley's?: http://jamesphurley.com/Revolution.html -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop,

Re: Yertle the Turtle

2017-01-31 Thread Colin Holgate via use-livecode
Whether you’re able to set subpixel or not, keep the intended location in variables, and add your move to the variables, then set the location of the turtle to the updated variables. > On Jan 31, 2017, at 2:41 AM, Richmond Mathewson via use-livecode > wrote: >

Re: Yertle the Turtle

2017-01-31 Thread hh via use-livecode
> Richmond wrote: > The problem is that (as far as I am aware) LiveCode cannot > move objects for fractions of pixels. Even if it could, this would be not enough, because sqrt(2) is an irrational number ;-) ___ use-livecode mailing list

Re: Yertle the Turtle

2017-01-31 Thread Mike Bonner via use-livecode
If I recall correctly, you can SET a location now that is a fraction of a pixel.. Keep track of the decimals as your current location and use those numbers (within reason) as your start point, and continue onward. (think it was called partial pixel positioning?) While the actual location will be

Re: Yertle the Turtle

2017-01-31 Thread Richmond Mathewson via use-livecode
Thanks for the equations (I had in fact already worked those out), the problem was not that, the problem is that (as far as I am aware) LiveCode cannot move objects for fractions of pixels, so a move of , say, 30 forward at 30 degrees might (and I haven't done the Maths yet) either be 29, 30

Re: Yertle the Turtle

2017-01-30 Thread Colin Holgate via use-livecode
It is, as you said, going to need sin and cos. The X movement would be 30 * cos(37/180 * Pi), and the Y movement would be 30 * sin(37/180 * Pi), in your example case. > On Jan 30, 2017, at 11:14 PM, Richmond Mathewson via use-livecode > wrote: > > The problem

Re: Yertle the Turtle

2017-01-30 Thread Mike Bonner via use-livecode
K heres the required parts.. *## takes length and the angle in radians and returns vector as x,y offsets* function aLenToVector pLen pAngle return pLen * sin(pAngle),pLen * cos(pAngle) end aLenToVector *## takes degrees and changes to radians* function dToRadians pDegrees return

Re: Yertle the Turtle

2017-01-30 Thread Mike Bonner via use-livecode
Yeah. Thats what my (as yet unrediscovered) library can help with. On Mon, Jan 30, 2017 at 11:14 PM, Richmond Mathewson via use-livecode < use-livecode@lists.runrev.com> wrote: > The problem is not with drawing the line. > > The problem is how, when the turtle's "nose" is pointing at, say, 37 >

Re: Yertle the Turtle

2017-01-30 Thread Richmond Mathewson via use-livecode
The problem is not with drawing the line. The problem is how, when the turtle's "nose" is pointing at, say, 37 degrees from the vertical one can get it to move FORWARD for 30 units. Richmond. On 1/30/17 11:46 pm, Tore Nilsen via use-livecode wrote: 30. jan. 2017 kl. 21.20 skrev Richmond

Re: Yertle the Turtle

2017-01-30 Thread Mike Bonner via use-livecode
Somewhere around here I have a library that should help with your turtle moving. Will see if I can dig it up. On Mon, Jan 30, 2017 at 2:46 PM, Tore Nilsen via use-livecode < use-livecode@lists.runrev.com> wrote: > > > 30. jan. 2017 kl. 21.20 skrev Richmond Mathewson via use-livecode < >

Re: Yertle the Turtle

2017-01-30 Thread Tore Nilsen via use-livecode
> 30. jan. 2017 kl. 21.20 skrev Richmond Mathewson via use-livecode > : > > 2.2. I wonder how my turtle will be seen to draw a pen line from the two ends > of the "line". If you would like the “turtle” to move to the points of the line then, lock screen, draw