Creating a curve using text files

Home Forums Making things with IanniX Creating a curve using text files

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5508 Reply
    Gill
    Guest

    Hello,

    I’m wondering if it’s possible to create a curve using a list of Cartesian coordinates I have as a textfile without having to type them all in by hand? If so, how do I do this?

    Thanks in advance, and thank you for making IanniX open source, it’s very valuable for students like me!

    Kind regards,

    Gill

    #5509 Reply
    IanniX
    Keymaster

    Hi!

    Create a curve (a polyline, not an equation one) and copy it in clipboard.
    Then paste it in a text-editor, you’ll discover something useful for you!

    #5510 Reply
    Gill
    Guest

    Thank you, I followed your instructions, and the text file shows me the relevant code which is great, but how can I input my list of coordinates without hand typing them all?

    The code for the curve points in the text file I created from copying the curve looks like this:

    var points1 = [
    {x: 0, y: 0, z: 0, c1x: 0, c1y: 0, c1z: 0, c2x: 0, c2y: 0, c2z: 0},
    {x: 0, y: 0.0164766, z: 0, c1x: 0, c1y: 0.00329532, c1z: 0, c2x: -0.00329532, c2y: -0.0131812, c2z: 0}, etc…

    But my textfiles are just lists of numbers. Is there a way to input this in the correct syntax?

    Thanks again,

    Gill

    #5514 Reply
    IanniX
    Keymaster

    Hi Gill,

    With any text editor, you can format your list into our format. Have a look at Notepad++ or any text editor allowing column mode editing!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Reply #5514 in Creating a curve using text files
Your information:





© IanniX Association

What is IanniX? | Download | Showcase | Forums | Research | About