Now cut out an opening:
Next, we need to create a second circle.
Now let's continue this process for two additional circles.
Now that we have a rough draft of the maze, let's ask AI to analyze what we started and create a new program from it.
Here are a set of concentric circles with small openings at various places to form a simple maze. Look at the following Roblox code. Do you see a pattern in the following?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local s = require(ReplicatedStorage.genericShapes)
s.circle({x=0,y=6,z=0,thickness=9,size=30})
:rotate(90,0,90)
:fill(s.randomColor())
:cut(s.cube({x=15,y=4,z=0,thickness=9,size=10}),true)
s.circle({x=0,y=6,z=0,thickness=6,size=60})
:rotate(90,0,90)
:fill(s.randomColor())
:cut(s.cube({x=0,y=4,z=30,size=10}),true)
s.circle({x=0,y=6,z=0,thickness=6,size=90})
:rotate(90,0,90)
:fill(s.randomColor())
:cut(s.cube({x=-45,y=4,z=0,thickness=9,size=10}),true)
s.circle({x=0,y=6,z=0,thickness=6,size=120})
:rotate(90,0,90)
:fill(s.randomColor())
:cut(s.cube({x=0,y=4,z=-60,thickness=9,size=10}),true)
Write a program that draws a maze of 10 circles. The small openings in each circle should be placed at random locations along the circumference of the circle. There should be only one opening for each circle drawn. Use sine and cosine to calculate the coordinates of the smaller white circle.