# "Make circle" SOP?

## Recommended Posts

How can I access the new "make circle"-function procedurally?

Edited by konstantin magnus

##### Share on other sites

I know this is kind of a lame way to do it, but you could always do it with some math.

makeCircle.hip

• 1

##### Share on other sites

here´s another one ...

hth.

petz

• 3

##### Share on other sites

Thank you again @petz for posting a mathematical solution.

I am currently trying to apply it to another mesh (fig. 1). Unfortunately most of the points get collapsed (fig. 2). Is there anything I am missing out?

Meanwhile I was trying to come up with a simple solution on my own (fig. 3), which is not unifying the distances between the points along a circle but is averaging out their distance towards the center. Unfortunately I would not quite know how to flatten my points on an oblique plane based on their average normal (fig. 4).

human.hiplc

##### Share on other sites

well, once you have the average position, you can look at all the vectors from the center to the original positions,
adding up the cross products of each set of 2 of those vectors (flipping them if they have a dot products smaller than 0)
if you normalize that resulting vector, that should be the average plane orientation.

afterwards you could use this VEX function to layout all of your points on that plane:
http://www.sidefx.com/docs/houdini/vex/functions/planepointdistance.html

yay maths ^^

##### Share on other sites
18 hours ago, konstantin magnus said:

Thank you again @petz for posting a mathematical solution.

I am currently trying to apply it to another mesh (fig. 1). Unfortunately most of the points get collapsed (fig. 2). Is there anything I am missing out?

Meanwhile I was trying to come up with a simple solution on my own (fig. 3), which is not unifying the distances between the points along a circle but is averaging out their distance towards the center. Unfortunately I would not quite know how to flatten my points on an oblique plane based on their average normal (fig. 4).

please take a look at the attached file. i've slightly modified the old example and now it should work without problems.

hth,

petz

• 3

## Create an account

Register a new account