Recent

Author Topic: Turtle Graphics  (Read 7262 times)

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Turtle Graphics
« on: December 02, 2017, 12:39:10 am »
Turtle Graphics with BGRABitmap and BGRAControls:
https://github.com/lainz/turtlegraphics

Video of the application:
https://www.youtube.com/watch?v=-ZW0bihDjUY&vq=hd720

When I discovered turtle graphics I got amazed! I discovered turtle graphics in a demo that comes with Python IDLE, in the help menu. There you can find a lot of amazing examples to get inspired, or even port these to Pascal!
« Last Edit: December 05, 2017, 02:19:35 am by lainz »
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

lrcvsx

  • Newbie
  • Posts: 3
Re: Turtle Graphics
« Reply #1 on: December 04, 2017, 08:37:51 pm »
Hi: lainz


Look at YT the Xkrouhn channel, all videos are made with Freebasic Turtle.

Freebasic turle, I started it about 3 years ago, my latest version is the Turtle9.

Specifically watch the video: Freebasic Turtle.

Your example seems like an imitation of my program 3 years ago.

I wish you like the examples.

regards

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Turtle Graphics
« Reply #2 on: December 04, 2017, 08:55:43 pm »
Awesome channel, I found that video, is almost the same I did =)

But you did it in 2013!

I just increased the angle more slowly.

Here is the Canvas version:
https://lainz.github.io/webapps/turtlegraphics/

And another using Fibonacci:
https://lainz.github.io/webapps/turtlegraphicsfibonacci/

Impressive videos in your channel.

Edit: I found another exactly with the same code! 2015
https://www.youtube.com/watch?v=44kYhWmhJyI
« Last Edit: December 04, 2017, 09:09:03 pm by lainz »
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

lrcvsx

  • Newbie
  • Posts: 3
Re: Turtle Graphics
« Reply #3 on: December 04, 2017, 09:32:03 pm »
Hi

Ja, ja, ja...

One casuality!

Note: 4 years

Regards

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Turtle Graphics
« Reply #4 on: December 05, 2017, 01:10:14 am »
Hi

Ja, ja, ja...

One casuality!

Note: 4 years

Regards

Also notice every one that did this is in a different programming language, I never hear of Freebasic until today! Neither used FMS Logo from that video of 2015 I commented.

Edit: FMS Logo website features this kind of code in his main page, attached picture.

I think this code is older than we think.

Edit 2: A 1998 website!
https://web.archive.org/web/20171205012345/https://courses.cs.washington.edu/courses/cse341/98sp/assignments/assignment1.html

Is called a squiral

Edit 3: 1983
https://web.archive.org/web/20170927224843/https://www.atarimagazines.com/compute/issue32/063_1_HIGH_RESOLUTION_TURTLE_GRAPHICS.php
« Last Edit: December 05, 2017, 02:32:43 am by lainz »
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

dubst3pp4

  • Jr. Member
  • **
  • Posts: 86
  • Retro computing ~ GNU/Linux
    • me on Mastodon
Re: Turtle Graphics
« Reply #5 on: December 05, 2017, 07:39:54 am »
Hi lainz, great idea and a great JavaScript version! Back in the 90s as a kid I started to learn programming in school with turtle graphics, I think it must have been the Logo programming language (https://en.wikipedia.org/wiki/Logo_(programming_language)).

It is still a great concept to get kids (and adults, too) into programming, as you can see immediately the effect of your code and ideas.

Best regards,
Marc
Jabber: xmpp:marc.hanisch@member.fsf.org -- Support the Free Software Foundation: https://my.fsf.org/donate

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9090
  • FPC developer.
Re: Turtle Graphics
« Reply #6 on: December 05, 2017, 12:04:00 pm »
Afaik turbo pascal 3 came with a turtle graph unit, but it was later deprecated in favor of a more modern Graph, the one that FPC provides.

The old one is known as "graph3"

Thaddy

  • Hero Member
  • *****
  • Posts: 10707
Re: Turtle Graphics
« Reply #7 on: December 05, 2017, 12:07:17 pm »
Afaik turbo pascal 3 came with a turtle graph unit, but it was later deprecated in favor of a more modern Graph, the one that FPC provides.

The old one is known as "graph3"

TP3 is available for free here: http://edn.embarcadero.com/article/20792 You will need an account for the download and login first.
There is a good chance the turtle graph  works, maybe just in TP mode on i8086 (dosbox), but maybe needs trunk for that.
I did not check. I have only TP 1.0 and TP 5.5 from the museum.
« Last Edit: December 05, 2017, 12:12:45 pm by Thaddy »

lrcvsx

  • Newbie
  • Posts: 3
Re: Turtle Graphics
« Reply #8 on: December 05, 2017, 02:52:54 pm »
Hi, lainz:

Many years ago, I used with TP3 and later with TP7.

Then I started with GW, QB, MSWLOGO, FMSLOGO and finally with FB.

Some examples are in YT, Xkrouhn

I like to program simply for hobby.

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Turtle Graphics
« Reply #9 on: December 05, 2017, 03:59:25 pm »
Hi, lainz:

Many years ago, I used with TP3 and later with TP7.

Then I started with GW, QB, MSWLOGO, FMSLOGO and finally with FB.

Some examples are in YT, Xkrouhn

I like to program simply for hobby.

I started programming as a hobby also (now I'm working and also studiying for a career), first with Lua script, then Pascal, JavaScript (Browser & Node.js), PHP, C#, Java...

Hi lainz, great idea and a great JavaScript version! Back in the 90s as a kid I started to learn programming in school with turtle graphics, I think it must have been the Logo programming language (https://en.wikipedia.org/wiki/Logo_(programming_language)).

It is still a great concept to get kids (and adults, too) into programming, as you can see immediately the effect of your code and ideas.

Best regards,
Marc

Thanks, and yes is very intuitive.

Afaik turbo pascal 3 came with a turtle graph unit, but it was later deprecated in favor of a more modern Graph, the one that FPC provides.

The old one is known as "graph3"
Afaik turbo pascal 3 came with a turtle graph unit, but it was later deprecated in favor of a more modern Graph, the one that FPC provides.

The old one is known as "graph3"

TP3 is available for free here: http://edn.embarcadero.com/article/20792 You will need an account for the download and login first.
There is a good chance the turtle graph  works, maybe just in TP mode on i8086 (dosbox), but maybe needs trunk for that.
I did not check. I have only TP 1.0 and TP 5.5 from the museum.

There are a lot of libraries out there, I know my example lacks of many of the functions from all these libraries.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

alaa123456789

  • Full Member
  • ***
  • Posts: 152
Re: Turtle Graphics
« Reply #10 on: January 18, 2021, 08:29:24 pm »
hi all ,
turtle is very and interesting subject , as it was with us in younger stage , so i found very useful component in delphi , but we need help of you to convert to Lazarus package
please all help
http://arbeitsplattform.bildung.hessen.de/fach/informatik/delphi/rekgraf/rekgraf2.htm.html

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Turtle Graphics
« Reply #11 on: January 18, 2021, 11:43:33 pm »
If you look at my code, you can see that move and rotate are implemented, color is just another property in bgrabitmap drawing, so it already works, try using that.
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Turtle Graphics
« Reply #12 on: January 18, 2021, 11:56:12 pm »
If you look at my code, you can see that move and rotate are implemented, color is just another property in bgrabitmap drawing, so it already works, try using that.

https://github.com/lainz/turtlegraphics

WOW, very impressive, fast and out-of-the-box.

Congrats.
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

lainz

  • Hero Member
  • *****
  • Posts: 3965
  • Leandro Diaz
Re: Turtle Graphics
« Reply #13 on: January 19, 2021, 12:13:10 am »
If you look at my code, you can see that move and rotate are implemented, color is just another property in bgrabitmap drawing, so it already works, try using that.

https://github.com/lainz/turtlegraphics

WOW, very impressive, fast and out-of-the-box.

Congrats.

Thanks to @circular, he did the code, I grabbed it from somewhere in this big forum  :)
https://lainz.github.io/ - My Website :)
https://lazpaint.github.io/ -  Download LazPaint

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Turtle Graphics
« Reply #14 on: January 19, 2021, 12:50:33 am »
If you look at my code, you can see that move and rotate are implemented, color is just another property in bgrabitmap drawing, so it already works, try using that.

https://github.com/lainz/turtlegraphics

WOW, very impressive, fast and out-of-the-box.

Congrats.

Thanks to @circular, he did the code, I grabbed it from somewhere in this big forum  :)

Thanks to both.

Huh, do you think I could use it for the Strumpract-Image-Dancer?
I just try it making dance and it is bluffing (and with color changing 2xWow).
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

 

TinyPortal © 2005-2018