Flow/wrap text into an irregular shape

James Hurley jhurley0305 at sbcglobal.net
Mon Dec 30 12:08:52 EST 2013


Thanks  Bill,

Actually there are 4 different flavors of Turtle Graphics—I was going through a phase at the time. 

The basic advantage of TG is that it speaks a language closer to Euclidian than Cartesian geometry.  

On my  RunRev web site there  is a brief description of each and the ability to download at: 

     http://www.jamesphurley.com/Revolution.html   


In summary: 

1) Turtle graphics: This is the simplest, fastest, and most stable version. (Fastest except for “Stop Turtle”) It includes many simulations in physics, biology and mathematics. It draws with the pencil.

2) Control turtles: This does for controls what “Turtle graphics” does for the drawing cursor (the Turtle). It allows LC to issue graphic commands to any control: button, field, graphic, or image. If the control leaves a tracing behind, it is a vector image. 

3) Tell turtles: Provides multiple turtles (sprits) that draw independent vector graphics. A fox image may chase a rabbit image, each leaving (or not) a tracing behind them.

4) StopTurtles: Once again, provides multiple turtles and is vector based. This flavor of TG is best suited for applications which require a fast draw, but does not allow for the drawing to evolve step by step on the screen as the previous three versions. See for example the Jack-in-the-box. In this mode the drawing does not evolve in time as it is drawn, but the graphic is displayed when the StopTurtle command is executed after the new configuration of the sprint has been defined. Very fast. Something like the difference between a locked and unlocked screen, only faster. For example, the fast draw of the classic, recursive snowflake takes 40 milliseconds to draw in StopTurtles, but over 200 using either of the three versions above—even though the screen is locked. (There are 3,072  line segments in that snowflake.)

I still believe that if RunRev wants to penetrate the early education market, they should implement some version of TG into LC. I have made this suggestion to Kevin, but to no avail. It is easy to see why. They currently have much bigger fish to fry.

(You say you looked through the code. The line of code “wait 0 millisec” applies only to the Mac. Ever since Apple went to OS X, LC fails to do a screen refresh when a change in that image called for. The “wait 0 millisec” is there to force a screen refresh.)

Jim




> Message: 5
> Date: Sat, 28 Dec 2013 11:32:47 -0800
> From: "prothero at earthednet.org" <prothero at earthednet.org>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Subject: Re: Flow/wrap text into an irregular shape
> Message-ID: <9CDEEA57-4ACF-4B67-B940-6765304E032C at earthednet.org>
> Content-Type: text/plain; charset=us-ascii
> 
> Jim:
> Thanks for the sample program. I downloaded it and went through the code. It's a nice way of doing line drawing. I have been drawing directly into an image object to get a large number of symbols on a map, like Colin's sample draw program. But, for charts, your method looks like it will be very useful. 
> Best,
> Bill
> 
> William Prothero
> http://es.earthednet.org
> 
> 
> 
> On Dec 28, 2013, at 4:59 AM, Jim Hurley <jhurley0305 at sbcglobal.net> wrote:
> 
>> Hi Roger,
>> 
>> This is a voice from the past, using Turtle Graphics to print text along any graphic line.
>> 
>> GO TO CARD 3 where the text "This is a parabola" is printed along a parabola.
>> 
>> You might be able to do this with your triangle, drawing each side in small steps.
>> 
>> 
>> Run this in the msg box:
>> 
>>  go stack url "https://dl.dropboxusercontent.com/u/47044230/TextAlongPath.livecode"
>> 
>> Jim Hurley





More information about the use-livecode mailing list