# Carve circle

## Recommended Posts

Hello, this is a real Noob question and you can tell I'm not too familiar with how attributes work.

The short version of my question is:

how can i divide a circle into a number of circular arcs without creating a carve SOP for every arc?

Long version:

I want to create a number of circular arcs, you could imagine one arc from 12 o'clock to 2 o'clock, one arc from 2 to 5 o'clock and the last from 5 to 12 o'clock.

Now I would need it to be procedural, because there will not always be three arcs around the circle, but variying numbers.

It would also be nice to have them slightly separated.

I tried by creating an attribute create with the values 0, 2, 5 and 12. Then I created 3 carve SOP's and copied those values and "paste copied relative reference" for the first and second u in the carve sops.

It would be possible to create another attribute to tell how much separation there should be between the arcs.

But it's not very procedural if the number of arcs changes.

Any thoughts?

##### Share on other sites

You can carve a single arc that you want to repeat and then use the copy SOP and rotate each piece.

##### Share on other sites

Hi, that would work if all arcs where the same length, but they're not.

##### Share on other sites

Are the lengths random or do you want to control them? Either way if you dont want to recreate a carve sop for each arc you can still use the copy sop and use the stamp function.

You could make a control object with a ramp that represents the arc length as a function of the number of copies and have the copy sop use the value from the ramp to carve the arc.

##### Share on other sites

Thanks for the feedback. The lengths are not random.

A control object sounds good to me. I'll dig into it - found a video by Peter Quint about ramps - https://vimeo.com/6017920

Just one question, what would the control object be as you imagine it?

##### Share on other sites

Well with control object I just meant a control interface. You could make a null node with a ramp parameter that is being referenced by the input of your copy. The ramp parameter is a pretty abstract way of visualizing your arc lengths but it will work for any number of copies you want. You just have to re-adjust your ramp if you change the amount of copies so that the position of the ramp matches the segment you had in mind.

For something more concrete you could mimic the interface of the add sop. Here you could add extra segments and give values for the min and max u values to carve.

##### Share on other sites

Thank you Robert, I'll read up on ramps and give it a try.

##### Share on other sites

If you just want to enter a bunch of times of day, you could parse it all from a string parameter:

ee_curve_sections.hip

##### Share on other sites

Wow, that's great.

If I understand it correctly the carve sops first and second u takes value 0 and 1 from the list, and then the \$CY variable in the copy sop makes the carve sop use value number 1 and 2 for the next copy.

Wonderful, thank you very much!

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×