How to create 14-sided-circle?

I’m looking to create a fourteen-sided circular room as shown below:

However, I can’t figure out the maths required?
Understandably it’s 360 / 14 = 25 etc.
But as shown below the top left & right of the straight part and the lower left & right of the straight part is a shorter length to the rest.

Does anyone know how I can work this out?

Thank you,

3 Likes

360/14 = 25, so each point is 25 degrees apart.
To find the coordinates for a point, you need to use some shop math. sine and cosine each take an angle and spit out a coordinate on an axis.
X = cosine(25 degrees)
Y = sine(25 degrees)
Then you multiply by the radius of your circle and add the origin point.
in Lua, it would look like this.

local Radius = 25
local Points = 14
local Origin = Vector3.new(0, 0, 0)

local Output = {}
for angle = 1, Points do
	table.insert(Output, {
		math.cos(6.28/Points*angle)*Radius+Origin.X,
		math.sin(6.28/Points*angle)*Radius+Origin.Y
	})
end
print(Output)

That would give you the points. If we wanted to get the positions for the walls though, it requires a little bit more work. Or, we can cheat and use Roblox’s CFrame library like so.

local Radius = 25
local Points = 14
local Origin = Vector3.new(0, 0, 0)

local Output = {}

for angle = 1, Points do
	table.insert(Output, CFrame.new(Origin) * CFrame.fromAxisAngle(Vector3.new(0,1,0)) * CFrame.new(0, 0, -Radius))
end

print(Output)

The output is in CFrames, and if you don’t do any scripting and can’t get it to work out, I will convert it to a different format.

3 Likes

FYI, circles don’t have sides. What your asking for is how to make a 14-sided polygon.

6 Likes

This might help.

Archimedes Two (v2.4) - Roblox

2 Likes

I would recommend using blender. Paste in a cylinder, go to “add cylinder”, replace the vertices count from 32 to 14, and voila.

if you create a part and extend it’s length to the diameter of the room and leave the width as one, duplicate and rotate it, setting the Rotate increment in the model tab to the correct angle. Once this is done, you can manually resize the width of these parts or use the resize allign plugin to make it a solid shape. You can use the transform tool to place a snap-to-grid grid on the plane you want to build a wall on to allign parts to it, and enable local movement with ctrl+L to move parts based on their own orientation.

I’m a bit late, but here’s a really nice plugin I use for circular rooms:

1 Like