Custom Wave to drive Servomotor

Hello everbody, I'm working on a pulsatile flow heart project and I'm wondering my self if i can drive a servo motor with custom wave signals, like the heart waves (ventricular pressure and volume attached) in arduino uno. The idea is to simulate a heart flow.

RodrigoVialle:
I'm wondering my self if i can drive a servo motor

Do you mean a hobby servo or a servomotor?

I tried to duplicate the ventricular pressure wave with the sin function, but i couldnt adjust the width of the function. Ideas?

#include <Servo.h>

Servo myservo;
void beat (const int time, int begin, int end, int freq);

void setup() {
Serial.begin(9600);
myservo.attach(9);
}

void loop() {
beat(2,0,90,1000);
}

void beat (const int time, int begin, end ,int freq)
{
int pos;
float rad;
float pos_sin;
int servo_out;

for (pos = begin; pos <= end; pos += 1)
{
rad = 2 PI * pos / 180;
pos_sin = sin(rad);
servo_out = (90
pos_sin);
myservo.write(servo_out);
Serial.println(servo_out);
delay(time);
}
delay (freq);

}

Any ideas in how do i get to a wave close to the ventricule volume?

MarkT:
Do you mean a hobby servo or a servomotor?

Im testing on a hobby but i want to replicate it on an ac servomotor

Precomputed wave-table seems the obvious approach, probably in PROGMEM.