Home › Forums › Making things with IanniX › Creating a curve using text files
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
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!
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
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!
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |