{"id":143,"date":"2026-03-19T19:18:00","date_gmt":"2026-03-19T19:18:00","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/l_lazar\/?p=143"},"modified":"2026-03-19T19:18:00","modified_gmt":"2026-03-19T19:18:00","slug":"heres-sum-light-from-turtle-that-i-forgot-to-post-on-free-friday-2-27","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/l_lazar\/2026\/03\/19\/heres-sum-light-from-turtle-that-i-forgot-to-post-on-free-friday-2-27\/","title":{"rendered":"here&#8217;s sum light from turtle that i forgot to post on free friday 2\/27"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"530\" src=\"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1.png\" alt=\"\" class=\"wp-image-145\" srcset=\"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1.png 817w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1-300x195.png 300w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1-768x498.png 768w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/figure>\n\n\n\n<p>here&#8217;s the code for this spirle thingey <\/p>\n\n\n\n<p>its just sum light <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"535\" src=\"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1024x535.png\" alt=\"\" class=\"wp-image-144\" srcset=\"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1024x535.png 1024w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-300x157.png 300w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-768x401.png 768w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-1536x802.png 1536w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image.png 1917w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>here&#8217;s sumthing a lil better<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"957\" src=\"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-2.png\" alt=\"\" class=\"wp-image-146\" srcset=\"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-2.png 976w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-2-300x294.png 300w, https:\/\/theroyalscode.com\/students\/l_lazar\/wp-content\/uploads\/2026\/03\/image-2-768x753.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<p> it grows over time i forgot how to show u it dose that&#8230; heres the code<\/p>\n\n\n\n<p><em>import<\/em> turtle<\/p>\n\n\n\n<p><em>import<\/em> random<\/p>\n\n\n\n<p><em>import<\/em> time<\/p>\n\n\n\n<p><em>import<\/em> turtle<\/p>\n\n\n\n<p><em>import<\/em> math<\/p>\n\n\n\n<p><em>import<\/em> colorsys<\/p>\n\n\n\n<p><em># Setup screen<\/em><\/p>\n\n\n\n<p>screen = turtle.Screen()<\/p>\n\n\n\n<p>screen.bgcolor(&#8220;black&#8221;)<\/p>\n\n\n\n<p>screen.setup(width=1000, height=1000)<\/p>\n\n\n\n<p>screen.tracer(0)<\/p>\n\n\n\n<p>t = turtle.Turtle()<\/p>\n\n\n\n<p>t.hideturtle()<\/p>\n\n\n\n<p>t.speed(0)<\/p>\n\n\n\n<p><em># Create turtle<\/em><\/p>\n\n\n\n<p>burst = turtle.Turtle()<\/p>\n\n\n\n<p>burst.speed(0)<\/p>\n\n\n\n<p>burst.hideturtle()<\/p>\n\n\n\n<p><em>def<\/em> draw_ray(length, angle, color, width):<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.penup()<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.goto(0, 0)<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.setheading(angle)<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.pendown()<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.pensize(width)<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.pencolor(color)<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.forward(length)<\/p>\n\n\n\n<p><em>def<\/em> draw_polygon(x, y, sides, size, rot, color_idx):<\/p>\n\n\n\n<p>&nbsp; &nbsp; &#8220;&#8221;&#8221;Draw a rotated polygon at given position&#8221;&#8221;&#8221;<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.penup()<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.goto(x, y)<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.setheading(rot)<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.pendown()<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.color(color[color_idx % 360])<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.pensize(2)<\/p>\n\n\n\n<p>&nbsp; &nbsp; <em>for<\/em> _ <em>in<\/em> range(sides):<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; t.forward(size)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; t.left(360 \/ sides)<\/p>\n\n\n\n<p>&nbsp; &nbsp; t.penup()<\/p>\n\n\n\n<p><em># Generate streaks<\/em><\/p>\n\n\n\n<p>streaks = []<\/p>\n\n\n\n<p>num_streaks = 220<\/p>\n\n\n\n<p>angle_step = 360 \/ num_streaks<\/p>\n\n\n\n<p><em>for<\/em> i <em>in<\/em> range(num_streaks):<\/p>\n\n\n\n<p>&nbsp; &nbsp; base_angle = i * angle_step<\/p>\n\n\n\n<p>&nbsp; &nbsp; angle = base_angle + random.uniform(-0.8, 0.8)<\/p>\n\n\n\n<p>&nbsp; &nbsp; color = &#8220;#FFFFFF&#8221;<\/p>\n\n\n\n<p>&nbsp; &nbsp; length = random.uniform(80, 140)<\/p>\n\n\n\n<p>&nbsp; &nbsp; width = random.uniform(1.4, 2.2)<\/p>\n\n\n\n<p>&nbsp; &nbsp; growth = random.uniform(2.0, 4.0) &nbsp;<em># slower growth<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; streaks.append([length, angle, color, width, growth])<\/p>\n\n\n\n<p><em># Animation loop<\/em><\/p>\n\n\n\n<p>frames = 150<\/p>\n\n\n\n<p><em>for<\/em> frame <em>in<\/em> range(frames):<\/p>\n\n\n\n<p>&nbsp; &nbsp; burst.clear()<\/p>\n\n\n\n<p>&nbsp; &nbsp; <em>for<\/em> streak <em>in<\/em> streaks:<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; length, angle, color, width, growth = streak<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; <em># Inner thin segment<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.penup()<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.goto(0, 0)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.setheading(angle)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.pendown()<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.pensize(max(1.0, width * 0.7))<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.pencolor(color)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; inner_len = min(55, length * 0.45)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.forward(inner_len)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; <em># Outer thicker segment<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.pensize(width)<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; burst.forward(max(0, length &#8211; inner_len))<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; <em># Slower growth<\/em><\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; streak[0] += growth<\/p>\n\n\n\n<p>&nbsp; &nbsp; screen.update()<\/p>\n\n\n\n<p>&nbsp; &nbsp; time.sleep(0.08) &nbsp;<em># slower frame rate<\/em><\/p>\n\n\n\n<p>turtle.done()<\/p>\n","protected":false},"excerpt":{"rendered":"<p>here&#8217;s the code for this spirle thingey its just sum light here&#8217;s sumthing a lil better it grows over time i forgot how to show u it dose that&#8230; heres the code import turtle import random import time import turtle import math import colorsys # Setup screen screen = turtle.Screen() screen.bgcolor(&#8220;black&#8221;) screen.setup(width=1000, height=1000) screen.tracer(0) t = turtle.Turtle() t.hideturtle() t.speed(0) # Create turtle burst = turtle.Turtle() burst.speed(0) burst.hideturtle() def draw_ray(length, angle, color, width): &nbsp; &nbsp; burst.penup() &nbsp; &nbsp; burst.goto(0, 0) &nbsp; &nbsp; burst.setheading(angle) &nbsp; &nbsp; burst.pendown() &nbsp; &nbsp; burst.pensize(width) &nbsp; &nbsp; burst.pencolor(color) &nbsp; &nbsp; burst.forward(length) def draw_polygon(x, y, sides, size, rot,<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-143","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/posts\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/posts\/143\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_lazar\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}