Jump to content

Simpler Cvex Example?


Recommended Posts

Hello,

CVEX looks really cool, but um, I don't really understand the example, which I realize shows off lots of things but I really don't get it. Anyone have a simpler example? All I want to do is load a gdp (I know how to do this) that has, say, 4 lines in it. Each line has a prim attribute "seed" which is just its prim number basically.

Then I want to run this VEX code on it, where freq and amp are, let's say, hard-coded.

cvex
simplenoise(vector freq = 1;float amp = 1; int seed; export randpoint = 0;)
{
       randpoint = random(seed);
       P += noise((P+seed)*freq)*amp;
}

and output the newly positioned points.

There is more in my real work but this is jist of it. I don't even see in the CVEX example where the geometry is :(

Cheers,

Peter B

Link to comment
Share on other sites

Don't everyone rush in at once :)

OK, so I have to fill an array named the same as the VEX Variable, say "P" and then another to write to, say "Cf".

Any way to act directly on the gdp's points without all this copying/filling arrays?

Cheers,

Peter B

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...