Skip to main content
Participant
July 30, 2013
Question

How can I draw a curve that follows an equation?

  • July 30, 2013
  • 1 reply
  • 1795 views

Hi everyone

I am trying to write a script to draw geometric figures in Illustrator.

I want to achieve this by writing an equation into the ESTK, for example x^2 + y^2 =100.

This should generate a circle with a radius of 10 units.

Does anyone know if this is possible?  If so, please would you share your technique with me?  Also if you have an example script this would be even better!

Thank you

This topic has been closed for replies.

1 reply

pixxxelschubser
Community Expert
Community Expert
July 31, 2013

Not enough informations.

But this can help you a little bit:

// 100 = x^2 + y^2

// 10 = square root ( x^2 + y^2)

// if you know the x and the y-value then:

var x = 6;

var y = 8;

var yourRadius = (Math.sqrt (Math.pow ( x, 2 ) + Math.pow ( y, 2 ) ));

alert (yourRadius)

And this thread:

http://forums.adobe.com/message/3517274?tstart=0

and this one:

http://forums.adobe.com/thread/792369?tstart=0