Big Symmetrical Tree
#1
Well, not exactly symmetrical, but close. So I call it: A Big Tree.


[Image: A-Big-Tree-app.jpg]



Code: (Select All)
'Big Tree by SierraKen - September 3, 2022.
'Feel free to use this in any code.
'The screen cannot have _RGB32(255, 125, 127) or _RGB32(255, 127, 127) because they use that for points as a plot value.
Screen _NewImage(1000, 600, 32)
_Title "A Big Tree"
start:
_Limit 20
Cls
'sky
blue = 75
For y = 0 To 500
    blue = blue + .5
    Line (0, y)-(1000, y), _RGB32(0, 0, blue)
Next y
blue = 0
'Ground
green = 75
For y = 501 To 600
    green = green + 2
    Line (0, y)-(1000, y), _RGB32(0, green, 0)
Next y
green = 0
Line (499, 500)-(501, 480), _RGB32(255, 127, 127), BF
PSet (500, 480), _RGB32(255, 125, 127)
limbsy = 490
size = 115
seconds = 12
seconds2 = 48
For stories = 1 To 6
    size = size - 1.5
    For yy = 0 To 600
        For xx = 0 To 1000
            If Point(xx, yy) = _RGB32(255, 125, 127) Then
                seconds = seconds - .25
                seconds2 = seconds2 + .25
                limbsx = xx
                limbsy = yy
                s = (60 - seconds) * 6 + 180
                x = Int(Sin(s / 180 * 3.141592) * size) + limbsx
                y = Int(Cos(s / 180 * 3.141592) * size) + limbsy
                Line (limbsx + b, limbsy)-(x + b, y), _RGB32(255, 127, 127)
                PSet (x, y), _RGB32(255, 125, 127)
                s = (60 - seconds2) * 6 + 180
                x = Int(Sin(s / 180 * 3.141592) * size) + limbsx
                y = Int(Cos(s / 180 * 3.141592) * size) + limbsy
                Line (limbsx, limbsy)-(x, y), _RGB32(255, 127, 127)
                PSet (x, y), _RGB32(255, 125, 127)
            End If
        Next xx
    Next yy
Next stories
For leaves = 1 To 60000
    leafx = Rnd * 1000
    leafy = Rnd * 480
    If Point(leafx, leafy) = _RGB32(255, 127, 127) Then
        For sz = .25 To 4 Step .25
            Circle (leafx, leafy + 4), sz, _RGB32(0, 255, 0), , , 2.5
        Next sz
    End If
Next leaves

Do:
    _Limit 20
    a$ = InKey$
    If a$ = Chr$(27) Then End
Loop
Reply


Messages In This Thread
Big Symmetrical Tree - by SierraKen - 09-04-2022, 03:28 AM
RE: Big Symmetrical Tree - by SierraKen - 09-05-2022, 08:29 PM
RE: Big Symmetrical Tree - by James D Jarvis - 09-06-2022, 01:21 PM
RE: Big Symmetrical Tree - by SierraKen - 09-06-2022, 08:19 PM



Users browsing this thread: 1 Guest(s)