Coding a Sine / Cosine Wave for the Particle System

I want to code a sine wave and later cosinus curve for the shuriken particle system. But i’m stuck. I want to defind with how many points the curve gets created and with how many complete degrees the curve should be shown. As base 360 degrees for 1 complete sine wave.

Currently i have:

void CreateCircle()
	{
		ParticleSystem PS = GetComponent<ParticleSystem>();
		var vel = PS.velocityOverLifetime;
		vel.enabled = true;
		vel.space = ParticleSystemSimulationSpace.Local;

		AnimationCurve curveX = new AnimationCurve();
		float points = 10 * repeat;
		for (int i = 0; i < points; i++)
		{
			float newtime = i / (points - 1);
			float myvalue = Mathf.Sin(i*360);

			curveX.AddKey(newtime,myvalue);
			Debug.Log(newtime);
		}
		vel.x = new ParticleSystem.MinMaxCurve(10.0f, curveX);
	}

So i want to create the x curve with 10 points at first.
What have i done wrong? I hope somebody can help me out.
Thanls in advance.

Didn’t you forget to modify the lifetime of the particles?

protected void CreateCircle()
    {
        ParticleSystem ps = GetComponent<ParticleSystem>();
        ps.startLifetime = Repeat;
        ParticleSystem.VelocityOverLifetimeModule vel = ps.velocityOverLifetime;
        vel.enabled = true;
        vel.space = ParticleSystemSimulationSpace.Local;

        AnimationCurve curveZ = new AnimationCurve();
        float points = 10 * Repeat;
        for (int i = 0; i < points; i++)
        {
            float newtime = i / (points - 1);
            float myvalue = Mathf.Sin(i * 360);

            curveZ.AddKey(newtime, myvalue);
            Debug.Log(newtime);
        }