Jump to content

control the shape by ramp


Recommended Posts

Happy new year, everyone. :)

Let me ask my first question this year, I'm sure i have saw the similar problem before, but i can't find it again.

So how can i control the shape of the grid become to a grid like. I want a smooth outline of my grid,not be a spindle. But it seems the ramp can't do it.

I will appreciate if someone give me help.

 

post-9982-0-56691400-1420526862_thumb.pn

vopsop.hip

Link to comment
Share on other sites

wateryfield, what's this for?

 

this is the best I could do, but it's just starting with a circle. do you have to start with a grid? note there's not a 1:1 corespondance between the 50x50 grid and the points in the final geo, you have to toss away some points or the Triangulate2D SOP explodes because of points in the same place.

circleTheSquare-2.hip

Link to comment
Share on other sites

 

http://en.wikipedia.org/wiki/Squaring_the_circle

 

But it is a lot of fun trying....

 

</R>

Thanks for your help, it looks a great fun.
 But actually i want use a ramp to control the grid, it does't need a perfect circle but much looks like a ellipse. 
 
 

wateryfield, what's this for?

 

this is the best I could do, but it's just starting with a circle. do you have to start with a grid? note there's not a 1:1 corespondance between the 50x50 grid and the points in the final geo, you have to toss away some points or the Triangulate2D SOP explodes because of points in the same place.

Actually i want do a deform so the grid looks like a leaf. :)

So you can see the ramp parameter deform much more like a spindle not a ellipse.

Is it possible to use a channel editor replace.

 

post-9982-0-08710100-1420714997_thumb.jp

post-9982-0-20328000-1420715003_thumb.jp

Link to comment
Share on other sites

 

 
Thanks for your help, it looks a great fun.
 But actually i want use a ramp to control the grid, it does't need a perfect circle but much looks like a ellipse. 
 
 

Actually i want do a deform so the grid looks like a leaf. :)

So you can see the ramp parameter deform much more like a spindle not a ellipse.

Is it possible to use a channel editor replace.

 

I have do multiply ramp so make the grid looks  like circle much more.

But if someone can use channel editor to replace will be great.

post-9982-0-55932300-1420715549_thumb.jp

Link to comment
Share on other sites

You can always create a parameter that has a channel with your shape. You can then do look ups using with the chf() function.

Thanks, edward.

I don't really understand how to do it. :mellow:

The parameter with a channel was just a point which it value change over time. But i want all the point follow the channel spine.

Can you show me a simple HIP.

Link to comment
Share on other sites

 

You can always create a parameter that has a channel with your shape. You can then do look ups using with the chf() function.

Thanks,  chf()function was i want.

 

 

 

 

Aha, I think this is what you're wanting. Real shame there's no bezier curves on the ramp parameter.

 

Check it :)

 

Thanks. Kleer001.

This is what i want, your example was simple enough and useful.

:)  

Link to comment
Share on other sites

  • 2 weeks later...
  • 6 years later...

Cutting a grid with a curve ramp.

cutting_ramp.jpg.f36335dea39841e27b7d7e2ecc95be0f.jpg

float scale = chf('scale');
float radius = chf('radius');
int freq = chi('frequency');
float rot = radians(chf('rotate'));

matrix3 m = ident();
rotate(m, rot, 2);
vector pos = v@P * m;

float dist = length(pos);
float angle = atan(pos.x, pos.z);
float angle_n = fit(angle, -M_PI, M_PI, 0.0, 1.0);
float shape = chramp('shape', angle_n * freq);

f@dist = (dist - radius) - shape * (scale - radius);

 

cutting_grid.hiplc

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...