Author Topic: Turtle Flower  (Read 1712 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Guest
Turtle Flower
« on: February 01, 2012, 02:44:38 PM »

We seem to have lost a couple of postings. I don't know what happened there but here is the code posted by Peter. I have also added this example to /projects/GDIWindow along with the animated Julia.

Code: OxygenBasic
  1. include "win64.h" 'include "window2.h"
  2.  
  3. Window "TURTLE", 600, 600, 2
  4. Font 12,24,0,"courier"
  5. sys_mode=4
  6. float a,b,x2,y2,angle=1,angle_difference=.8
  7. sys counter,color_value=7,difference=2,length=500,x=50,y=550
  8.  
  9. ClsColor 200,200,248
  10. y2 = y - length
  11. length = length - difference
  12. y = y2
  13.  
  14. While counter <180
  15.       a = sin(rad(angle)) * length
  16.       b = cos(rad(angle)) * length
  17.       x2 = x + b
  18.       y2 = y + a
  19.       Line x, y, x2, y2, 1, color_value,color_value,color_value
  20.       angle = angle + angle_difference
  21.       length = length - difference
  22.       a = sin(rad(angle)) * length
  23.       b = cos(rad(angle)) * length
  24.       x = x2 - a
  25.       y = y2 + b
  26.       Line x2, y2, x, y, 1, color_value,color_value,color_value
  27.       angle = angle + angle_difference
  28.       length = length - difference
  29.       a = sin(rad(angle)) * length
  30.       b = cos(rad(angle)) * length
  31.       x2 = x - b
  32.       y2 = y - a
  33.       Line x, y, x2, y2, 1, color_value,color_value,color_value
  34.       angle = angle + angle_difference
  35.       length = length - difference
  36.       a = sin(rad(angle)) * length
  37.       b = cos(rad(angle)) * length
  38.       x = x2 + a
  39.       y = y2 - b
  40.       Line x2, y2, x, y, 1, color_value,color_value,color_value
  41.       length = length - difference
  42.       angle = angle + angle_difference
  43.       counter +=1
  44.       color_value += Rand(4,8)
  45. Wend
  46. WaitKey(32)
  47. WinEnd
  48.  

Charles

JRS

  • Guest
Re: Turtle Flower
« Reply #1 on: February 01, 2012, 11:34:56 PM »
Quote
We seem to have lost a couple of postings.

I haven't noticed any issues with the forum so it might be that Peter decided to delete his Turtle Flower post/thread.


JRS

  • Guest
Re: Turtle Flower
« Reply #2 on: February 06, 2012, 05:57:59 PM »
Is everyone asleep or is there an issue with posting to the forum I'm unaware of?


Charles Pegge

  • Guest
Re: Turtle Flower
« Reply #3 on: February 07, 2012, 01:02:10 AM »

Must be the Winter hibernation :)

I'm beavering away on the expression translator at the moment. It's all infrastructure. I hope to release another update soon.