Jump to content

Heart Beat Vex


Mexxgen

Recommended Posts

Hello folks,

i want to simulate a heart beating. And i am really bad at coding so... i managed implementing a sin function and fit it between other values so the heart doesnt get below 0 or the other direction because i connected it to the pscale of single point.

A friend of mine told me to set up a sleep function after one heart beat but we also dont know how. Is there any way to do a complete heart beat algorithm? If i could understand the math behind it parallel it would be awesome too :D

image.thumb.png.3d8c23bbf0c3ae34e5d2e66f45b69593.png

In the end i want it to transfer the position data to a vellum surface.... 

 

Link to comment
Share on other sites

Hi Max,

you are probably better off by drawing the function as a ramp curve and displace the mesh along its normals.

float f = chf('freq');
float s = chf('scale');
float t = @Time * f;
float disp = chramp('cardio', t);

v@P += v@N * disp * s;

If you upload the heart mesh, perhaps someone can setup a quick vellum simulation, too.

heart_rate.hipnc

Edited by konstantin magnus
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...