Loading points

Questions and discussions of a general nature about KnotPlot

Loading points

Postby ThunderCat on Tue Aug 31, 2010 4:23 pm

Is there anyway that I can input points into KnotPlot from a text file? Specifically, suppose that I have a series of points (eg, (1,1,1), (0,0,0), etc). I would create a text file like
1 (1,1,1)
2 (0,0,0)
etc
which could then be read into KnotPlot as a new knot. The existing feedback from the bead creation is virtually what you see above.

Thanks in advance

Harold
ThunderCat
 
Posts: 7
Joined: Mon Aug 30, 2010 5:26 pm

Re: Loading points

Postby ThunderCat on Tue Aug 31, 2010 8:55 pm

Not really a reply, but an additional question (related to the above). Can I export the bead list of something I create in bead xyz format? The idea is that I could create the points from the background image (which would gjve me a flat image, and then I could alter the z dimension manually to adjust for crossovers).
ThunderCat
 
Posts: 7
Joined: Mon Aug 30, 2010 5:26 pm

Re: Loading points

Postby rob on Wed Sep 01, 2010 8:58 pm

hi

yes, these can both be done. use the load and save commands.

http://knotplot.com/manual/commands.html#load
http://knotplot.com/manual/commands.html#save

by default, KnotPlot uses its own binary file format. what you want is to save using the raw option, for example
save myknot raw

as an example, the following commands
torus 2 3 11
trans 1 1 1
save gumby raw
results in the following file gumby:
12 1 1
4.2645946261885 8.1484651033303 3.72200896517257
-2.67468180452813 5.24080887080872 0.225235468686069
-8.01193344412014 -1.64614241179097 -1.50148798722493
-0.503335282051777 -9.45592655386726 2.48676224800289
6.42535590451154 -2.48666452707936 3.07831132947421
6.42535590451154 4.48666452707937 -1.07831132947421
-0.50333528205179 11.4559265538673 -0.48676224800289
-8.01193344412014 3.64614241179096 3.50148798722493
-2.67468180452813 -3.24080887080872 1.77476453131393
4.26459462618852 -6.1484651033303 -1.72200896517257


To create your own knot to input, just put three numbers per line, space separator.

To create a multi-component link, put a blank line. When loading from a plain text file such as gumby, KnotPlot will automatically close up all components, so don't duplicate the first vertex at the end of the file. You might want to load an open-ended string. in that case use the open command after you do the load.
http://knotplot.com/manual/commands.html#open
http://knotplot.com/manual/commands.html#close

For more info on various formats that KnotPlot can read and write, see http://knotplot.com/manual/parameters.html#sformat
Note that the following three commands are identical:
save gumby raw
save gumby ascii
save gumby 3


if the second parameter to save is omitted, then KnotPlot uses the current value of sformat. if you find you always want to save knots in raw ascii format, then do
sform = 3
before your saves.
(see the note at the beginning of the page http://knotplot.com/manual/parameters.html and http://knotplot.com/manual/commands.html about abbreviating KnotPlot parameter and command names).

rob....
User avatar
rob
Site Admin
 
Posts: 35
Joined: Fri Apr 18, 2008 2:23 am

Re: Loading points

Postby rob on Wed Sep 01, 2010 9:01 pm

ThunderCat wrote:Not really a reply, but an additional question (related to the above). Can I export the bead list of something I create in bead xyz format? The idea is that I could create the points from the background image (which would gjve me a flat image, and then I could alter the z dimension manually to adjust for crossovers).


if you sketch with a background image, you can use left and right click to go under and over, resp. click on the help button on the Sketch tab on the KnotPlot Control Panel or view the video http://knotplot.com/tut/basic-sketching/
User avatar
rob
Site Admin
 
Posts: 35
Joined: Fri Apr 18, 2008 2:23 am

Re: Loading points

Postby ThunderCat on Sat Sep 04, 2010 8:20 am

Thanks again for the reply, Rob.

If I save gumby, and open it up [unchanged raw file], all the beads are connected. However, if I change gumby [cutting down the number of decimal places] to
12 1 1
4.2 8.14 3.72
-2.67 5.24 0.22
-8.01 -1.64 -1.50
-0.50 -9.45 2.48
6.42 -2.48 3.07
6.42 4.48 -1.07
-0.50 11.45 -0.48
-8.01 3.64 3.501
-2.67 -3.24 1.77
4.26 -6.14 -1.72
when gumby opens up, I just have a series of beads. Why?
ThunderCat
 
Posts: 7
Joined: Mon Aug 30, 2010 5:26 pm

Re: Loading points

Postby rob on Mon Sep 06, 2010 2:57 am

ThunderCat wrote:Thanks again for the reply, Rob.

If I save gumby, and open it up [unchanged raw file], all the beads are connected. However, if I change gumby [cutting down the number of decimal places] to
12 1 1
4.2 8.14 3.72
-2.67 5.24 0.22
-8.01 -1.64 -1.50
-0.50 -9.45 2.48
6.42 -2.48 3.07
6.42 4.48 -1.07
-0.50 11.45 -0.48
-8.01 3.64 3.501
-2.67 -3.24 1.77
4.26 -6.14 -1.72
when gumby opens up, I just have a series of beads. Why?


can you attach a screen shot?
User avatar
rob
Site Admin
 
Posts: 35
Joined: Fri Apr 18, 2008 2:23 am

Re: Loading points

Postby ThunderCat on Fri Oct 22, 2010 7:45 pm

I have the attached file which reduces to about 3 intersections (from 97). Can KnotPlot cope with solving this (ie, going from 97 to 3)?

Bye for now

Harold


16.5 13.5 0
18 14.25 -1.5
19.5 15 -1.5
20.0625 15.28125 1.5
20.4375 15.5625 1.5
21 15.75 -1.5
21.28125 15.9375 -1.5
22.5 16.5 0
21.75 18 -1.5
21.28125 18.9375 -1.5
21 19.5 1.5
20.25 21 -1.5
20.0625 21.28125 1.5
19.5 22.5 0
18 21.75 1.5
16.5 21 1.5
15.5625 20.4375 -1.5
15 20.25 1.5
14.71875 20.0625 1.5
13.5 19.5 0
12 18.75 1.5
11.4375 18.5625 -1.5
10.5 18 1.5
9.9375 17.71875 1.5
9 17.25 1.5
8.71875 17.0625 -1.5
7.5 16.5 0
8.25 18 1.5
9 19.5 -1.5
9.28125 20.0625 -1.5
9.75 21 -1.5
10.5 22.5 0
9 21.75 1.5
8.0625 21.28125 1.5
7.5 21 1.5
6 20.25 1.5
4.5 19.5 0
3.75 18 -1.5
3 16.5 1.5
2.71875 15.9375 1.5
2.25 15 1.5
1.5 13.5 0
2.71875 12.9375 1.5
3 12.75 1.5
4.5 12 1.5
6 11.25 1.5
6.28125 11.0625 1.5
7.5 10.5 0
6 9.75 1.5
5.4375 9.5625 1.5
4.5 9 1.5
3.5625 8.4375 -1.5
3 8.25 1.5
2.71875 8.0625 1.5
1.5 7.5 0
2.25 6 1.5
2.71875 5.0625 1.5
3 4.5 -1.5
3.75 3 1.5
3.9375 2.71875 -1.5
4.5 1.5 0
6 2.25 -1.5
7.5 3 -1.5
8.4375 3.5625 1.5
9 3.75 -1.5
9.28125 3.9375 -1.5
10.5 4.5 0
12 5.25 -1.5
12.5625 5.4375 1.5
13.5 6 -1.5
14.0625 6.28125 1.5
15 6.75 -1.5
15.28125 6.9375 1.5
16.5 7.5 0
15.75 6 -1.5
15 4.5 1.5
14.71875 3.9375 1.5
14.25 3 1.5
13.5 1.5 0
15 2.25 -1.5
15.9375 2.71875 -1.5
16.5 3 -1.5
18 3.75 -1.5
19.5 4.5 0
20.25 6 1.5
21 7.5 -1.5
21.28125 8.0625 -1.5
21.75 9 -1.5
22.5 10.5 0
21.75 12 -1.5
21.28125 12.9375 -1.5
21 13.5 -1.5
20.25 15 -1.5
20.0625 15.28125 -1.5
19.5 16.5 0
20.25 18 1.5
20.4375 18.5625 -1.5
21 19.5 -1.5
21.75 21 -1.5
22.5 22.5 0
21 21.75 1.5
20.0625 21.28125 -1.5
19.5 21 1.5
18 20.25 1.5
16.5 19.5 0
15.75 18 -1.5
15.5625 17.4375 1.5
15 16.5 1.5
14.25 15 1.5
13.5 13.5 0
15 12.75 1.5
16.5 12 -1.5
17.4375 11.4375 -1.5
18 11.25 1.5
19.5 10.5 0
20.25 9 1.5
20.4375 8.4375 -1.5
21 7.5 1.5
21.75 6 1.5
22.5 4.5 0
21.28125 3.9375 -1.5
21 3.75 1.5
20.4375 3.5625 -1.5
19.5 3 -1.5
18 2.25 -1.5
16.5 1.5 0
15.9375 2.71875 1.5
15.75 3 -1.5
15.5625 3.5625 1.5
15 4.5 -1.5
14.25 6 -1.5
14.0625 6.28125 -1.5
13.5 7.5 0
12.75 6 1.5
12.5625 5.4375 -1.5
12 4.5 1.5
11.4375 3.5625 -1.5
11.25 3 1.5
10.5 1.5 0
9.9375 2.71875 -1.5
9.75 3 -1.5
9.28125 3.9375 1.5
9 4.5 -1.5
8.25 6 1.5
8.0625 6.28125 1.5
7.5 7.5 0
6 6.75 1.5
4.5 6 1.5
3.9375 5.71875 1.5
3.5625 5.4375 1.5
3 5.25 1.5
2.71875 5.0625 -1.5
1.5 4.5 0
2.25 6 -1.5
3 7.5 -1.5
3.5625 8.4375 1.5
3.75 9 -1.5
4.5 10.5 0
6 11.25 -1.5
6.5625 11.4375 1.5
7.5 12 1.5
9 12.75 -1.5
10.5 13.5 0
9.75 15 -1.5
9 16.5 -1.5
8.71875 17.0625 1.5
8.25 18 -1.5
7.5 19.5 0
6 20.25 -1.5
4.5 21 1.5
3.9375 21.28125 1.5
3 21.75 -1.5
1.5 22.5 0
2.25 21 1.5
2.71875 20.0625 -1.5
3 19.5 -1.5
3.75 18 1.5
4.5 16.5 0
3.9375 15.28125 1.5
3.75 15 1.5
3 13.5 1.5
2.71875 12.9375 -1.5
2.25 12 1.5
1.5 10.5 0
2.25 9 1.5
2.71875 8.0625 -1.5
3 7.5 1.5
3.75 6 -1.5
3.9375 5.71875 -1.5
4.5 4.5 0
6 5.25 -1.5
7.5 6 -1.5
8.0625 6.28125 -1.5
8.4375 6.5625 -1.5
9 6.75 -1.5
10.5 7.5 0
9.75 6 1.5
9 4.5 1.5
8.4375 3.5625 -1.5
8.25 3 1.5
7.5 1.5 0
9 2.25 -1.5
9.9375 2.71875 1.5
10.5 3 -1.5
11.4375 3.5625 1.5
12 3.75 -1.5
13.5 4.5 0
14.71875 3.9375 -1.5
15 3.75 1.5
15.5625 3.5625 -1.5
16.5 3 1.5
18 2.25 1.5
19.5 1.5 0
20.0625 2.71875 1.5
20.25 3 -1.5
20.4375 3.5625 1.5
21 4.5 1.5
21.75 6 -1.5
22.5 7.5 0
21.28125 8.0625 1.5
21 8.25 -1.5
20.4375 8.4375 1.5
19.5 9 -1.5
18.5625 9.5625 -1.5
18 9.75 -1.5
16.5 10.5 0
17.71875 11.0625 -1.5
18 11.25 -1.5
19.5 12 -1.5
21 12.75 -1.5
21.28125 12.9375 1.5
22.5 13.5 0
21.75 15 -1.5
21.28125 15.9375 1.5
21 16.5 -1.5
20.25 18 -1.5
20.0625 18.28125 1.5
19.5 19.5 0
18 18.75 1.5
16.5 18 1.5
15.9375 17.71875 1.5
15.5625 17.4375 -1.5
15 17.25 1.5
13.5 16.5 0
14.25 18 -1.5
15 19.5 -1.5
15.5625 20.4375 1.5
15.75 21 -1.5
16.5 22.5 0
15 21.75 1.5
14.0625 21.28125 1.5
13.5 21 1.5
12.5625 20.4375 -1.5
12 20.25 1.5
10.5 19.5 0
9.28125 20.0625 1.5
9 20.25 -1.5
8.4375 20.4375 1.5
7.5 21 -1.5
6 21.75 1.5
4.5 22.5 0
3.9375 21.28125 -1.5
3.75 21 1.5
3.5625 20.4375 -1.5
3 19.5 1.5
2.25 18 1.5
1.5 16.5 0
2.71875 15.9375 -1.5
3 15.75 1.5
3.5625 15.5625 -1.5
3.9375 15.28125 -1.5
4.5 15 1.5
6 14.25 1.5
7.5 13.5 0
6.9375 12.28125 -1.5
6.75 12 1.5
6.5625 11.4375 -1.5
6.28125 11.0625 -1.5
6 10.5 1.5
5.4375 9.5625 -1.5
5.25 9 1.5
4.5 7.5 0
3.75 6 1.5
3.5625 5.4375 -1.5
3 4.5 1.5
2.25 3 1.5
1.5 1.5 0
3 2.25 -1.5
3.9375 2.71875 1.5
4.5 3 -1.5
6 3.75 -1.5
7.5 4.5 0
8.25 6 -1.5
8.4375 6.5625 1.5
9 7.5 -1.5
9.75 9 -1.5
10.5 10.5 0
9 11.25 -1.5
7.5 12 -1.5
6.9375 12.28125 1.5
6 12.75 -1.5
4.5 13.5 0
3.75 15 -1.5
3.5625 15.5625 1.5
3 16.5 -1.5
2.25 18 -1.5
1.5 19.5 0
2.71875 20.0625 1.5
3 20.25 -1.5
3.5625 20.4375 1.5
4.5 21 -1.5
6 21.75 -1.5
7.5 22.5 0
8.0625 21.28125 -1.5
8.25 21 1.5
8.4375 20.4375 -1.5
9 19.5 1.5
9.75 18 1.5
9.9375 17.71875 -1.5
10.5 16.5 0
11.25 18 -1.5
11.4375 18.5625 1.5
12 19.5 -1.5
12.5625 20.4375 1.5
12.75 21 -1.5
13.5 22.5 0
14.0625 21.28125 -1.5
14.25 21 1.5
14.71875 20.0625 -1.5
15 19.5 1.5
15.75 18 1.5
15.9375 17.71875 -1.5
16.5 16.5 0
18 17.25 -1.5
19.5 18 -1.5
20.0625 18.28125 -1.5
20.4375 18.5625 1.5
21 18.75 -1.5
21.28125 18.9375 1.5
22.5 19.5 0
21.75 18 1.5
21 16.5 1.5
20.4375 15.5625 -1.5
20.25 15 1.5
19.5 13.5 0
18 12.75 1.5
17.0625 12.28125 -1.5
16.5 12 1.5
15 11.25 1.5
13.5 10.5 0
14.25 9 1.5
15 7.5 1.5
15.28125 6.9375 -1.5
15.75 6 1.5
16.5 4.5 0
18 3.75 1.5
19.5 3 1.5
20.0625 2.71875 -1.5
21 2.25 1.5
22.5 1.5 0
21.75 3 -1.5
21.28125 3.9375 1.5
21 4.5 -1.5
20.25 6 -1.5
19.5 7.5 0
18.75 9 -1.5
18.5625 9.5625 1.5
18 10.5 -1.5
17.71875 11.0625 1.5
17.4375 11.4375 1.5
17.25 12 -1.5
17.0625 12.28125 1.5
ThunderCat
 
Posts: 7
Joined: Mon Aug 30, 2010 5:26 pm

Re: Loading points

Postby rob on Mon Feb 07, 2011 11:10 pm

ThunderCat wrote:I have the attached file which reduces to about 3 intersections (from 97). Can KnotPlot cope with solving this (ie, going from 97 to 3)?


yes, load it into KnotPlot and then:
  • enter the command safe to make sure it's "safe". If it's then KnotPlot can't guarantee preserving knot type when relaxing. Luckily, your knot is safe.
  • centre the knot by clicking on the centre button
  • on the Main control panel, increase the stusplit value to something non-zero (1 or 2)
  • click on the go button to start relaxing
  • as the knot relaxes, click on the dbeads button every now and then. the knot will quickly end up looking like the
    trefoil it is.

rob....
User avatar
rob
Site Admin
 
Posts: 35
Joined: Fri Apr 18, 2008 2:23 am

Re: Loading points

Postby scwolf on Tue Feb 08, 2011 9:31 pm

Hi Rob,

I have a similar question. I've been working with Jon Simon, and I have a list of 3-D points that form a knot which are contained in a Maple worksheet. I would like to import these points into KnotPlot in hopes of relaxing it and determining its knot type.

First of all, in what format should I export the data points from Maple. (For example, should I put them into a matrix and export them into Excel? Are there better options?)
Secondly, how can I best import them into KnotPlot?

Thanks in advance for your help!

Susie
scwolf
 
Posts: 1
Joined: Tue Feb 08, 2011 9:18 pm


Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron