Best way to create a circle of terrain?

I was wondering what would be the best way to go about creating a circle of terrain with some height about a given center point. I know there is a function that can do this with spheres being FillBall(), but nothing to my knowledge for circles.

My guess is that you would use WriteVoxels and apply trigonometric functions to that in order to create a circle?

Help is much appreciated, thank you.

1 Like

Is there a problem using FillBall and shaving off the top and bottom till you are left with the required circle? (Using FillBlock with Enum.Material.Air)

I could do that, although I don’t think that would be one of the most efficient ways.

Definitely not, but it is quick and should not matter too much unless you wanna do it very often. Alternatively you would fill circles of increasing radius till you reach the radius you want which is somewhat tedious as well.

This terrain (water) will be generated every time with a map; residing in a fountain. I do like your original idea for its simplicity, but I think I need a method that is more efficient.

A consideration is that while it does generate unnecessary extra terrain, it is a single call to the underlying engine to do the math for you (3 calls if you include the 2 FillBlock ones). This opposed to doing the math in Lua and having a call to the engine for each tiny bit of terrain you add.

That is true, I did have the thought that it could make up for its two extra steps due to it being written into their own engine.

The alternative I mentioned earlier is along the lines of;

local radius = 15 
for i = 1,360 do 
 local CF = * CFrame.Angles(0,math.rad(i),0) 
 CF = CF + CF.lookVector * (radius/2) 

However it becomes rather chunky. I have not fiddled around a lot with the terrain size to apply let alone using WriteVoxels though, but it gives a general (alternative) approach

Thanks for the help, I will try out some of your methods and some of my own.

But for all intensive purposes I think your original idea should be sound; since the map I am generating should only generate once every 10 minutes or so.

1 Like

Dang it, I had code that fills a cylinder. If I find it, I’ll post it. Does it in one clean sweep.


Cool, and thank you.