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?
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)
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.
The alternative I mentioned earlier is along the lines of;
local radius = 15
for i = 1,360 do
local CF = CFrame.new() * CFrame.Angles(0,math.rad(i),0)
CF = CF + CF.lookVector * (radius/2)
workspace.Terrain:FillBlock(CF,Vector3.new(0.2,0.2,radius),Enum.Material.Grass)
end
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.