Re: Yertle the Turtle

2017-02-02 Thread Jim Hurley via use-livecode
nd Mathewson > To: "u >> How to use LiveCode" > Subject: Yertle the Turtle > Message-ID: > Content-Type: text/plain; charset=utf-8; format=flowed > > Having imported an SVG image of a tortoise into a stack . . . > > Being a fan of Seymour Papert . . . >

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 vis

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 ppp name) > > On Tue,

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 in your face if you se

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 100.0

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: > https://apod.nasa.gov/htmltest/gifci

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 31

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 s

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. Appa

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 Ang

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, Mobil

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: > > Thanks for the equations (I h

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 use-livecode@lis

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 or

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 is not with drawing the line. >

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 pDegrees

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 > d

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 Math

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 < > use-live

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 the line, hide the line and unloc

Yertle the Turtle

2017-01-30 Thread Richmond Mathewson via use-livecode
Having imported an SVG image of a tortoise into a stack . . . Being a fan of Seymour Papert . . . I thought I'd try and implement turtle graphics in Livecode. But came up against something awkward . . . [As a caveat, I should like to point out I don't know how the following is implemented in