# Create procedural circle from a grid!

I have a procedural plane that I made with the double for loop method, but now I need it to be a circle, but I don’t know how I can implement it into code. My theory is to go through every vertex by the edge of every “loop” that the vertices make than normalize that vertex than multiply it by the index of whatever loop it is on, I have an image showing how to get the indices of the loops, but I don’t know how to code it, can someone give me a hint of sort? In this example the number of loops is 3 because if you count the loops created by the verts that’s how many there are, please take a good look at this pic it has lots of information on what I’m trying to achieve.

You’re welcome to sift through my MakeGeo project… it has a `MakeUVCircle` class and a bunch of other suchlike random procedural generation stuff.

MakeGeo is presently hosted at these locations:

https://bitbucket.org/kurtdekker/makegeo

hey thanks for the reply, I downloaded the assets folder and added the test uvcircle script to a game object, but i don’t know if you can have more than one segments on the uv circle? It only has one circular edge, but I need many many edges.

That code is only a single pie-wedge circle… but you could modify it easily to build extra radial tri pairs beyond that though.

1 Like

ok il look into it. thank you

actually I don’t think I should do it, because the vertices aren’t going to be distributed well enough to look good as a terrain.

You might wanna pick up Blender3D and try your hand at lowpoly terrain modeling… it’s easier than you think!

This guy has great pointers:

And you could accomplish a super-simple lowpoly terrain with these steps in blender:

• blank scene
• make a grid mesh object
• unwrap UVs (regular unwrap)