Author Topic: Another Step Forward  (Read 89217 times)

SS369

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2048
Re: Another Step Forward
« Reply #60 on: January 15, 2009, 11:22:16 PM »
I for one do not mind the tech banter. In fact I am learning something, for free, that may well be of some knotting usage or elsewhere.
Kudos to the tech- geniuses! ;-)
And keep us informed please.

Scott

DaveRoot

  • Exp. Member
  • ****
  • Posts: 145
    • The Most Useful Rope Knots....
Re: Another Step Forward
« Reply #61 on: January 17, 2009, 10:55:30 PM »
I just uploaded a new version of FCB (FCB.exe) to http://knotcyphers.pbwiki.com/The-FCB-Cypher.  It was fun working on the KnotTyer3D parser, so I kept on adding more bells and whistles to the program!

I uploaded the source code as well (https://knotcyphers.pbwiki.com/browse/#view=ViewAllFiles).  Derek, is that the proper place to upload these files?  I have started to refactor (re-work) the KnotTyer3D logic in order to build some re-usable routines (e.g. a routine to find all of the WEnds in a diagram, and a routine to trace through an entire cord, etc.), but it is still a work-in-progress.  See GridProcessor.pas.

Derek, do you have any modifications which need to be merged in?

Here are the updates in v4.3:

1. Under the File menu, there is a new option called "View With KnotTyer3D."  This will pop up a window which explains what KnotTyer3D is, and it provides a link to the KnotTyer3D website.  If KnotTyer3D is installed on your machine then enter the path and filename for KnotTyer3D.exe in this new window, as well as the filename to be used for exporting the current diagram (these filenames will be saved to a new INI file in the FCB.exe folder).  Clicking the "Run KnotTyer3D" button will display your diagram in KnotTyer3D.  It will display up to 3 cords.

The .KT3 file which the new parser creates is simply a text file, so Derek suggested popping up the .KT3 file to allow it to be edited (for tweaking the knot in KnotTyer3D).  However, KnotTyer3D has an editor which allows you to modify the file and view the results.  Let me know if you find some ways to improve the way that a knot looks in KnotTyer3D!

2. The main FCB window is now automatically maximized when it loads (because most of the window was off of my screen when it loaded).  I'm hoping that Derek or I can get it to scale the grid size based on the user's screen resolution, which will also enable us to provide zoom in/zoom out capability.

3. Added an Undo feature.

4. I thought it would be nice if the active palette tile is highlighted, but I just couldn't get it to put a satisfactory border around the active tile.  Therefore, I simply made the active tile bigger so that it stands out.

5. If you CTRL+click a cell on the diagram, the tile in that cell will be rotated.

6. For operations which will destroy your current diagram (e.g. File/New, File/Open, File/Exit), you'll now be prompted to save your changes.

7. The File/Save menu item is now disabled until a filename has been selected.


I tried to make it "bulletproof," so do your best to break it and let us know what bugs you find!

What would be a good name for this tool?  Some ideas:

   KnotDiagrammer
   KnotMaker
   KnotCharter
   KnotIllustrator
   KnotDesigner
   KnotCanvas
   KnotDraw
   KnotPaint
   KnotArtist
   KnotSketch


Dave

squarerigger

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 729
  • IGKTPAB Immediate Past President
    • The Knot Guy
Re: Another Step Forward
« Reply #62 on: January 18, 2009, 06:24:51 AM »
I like Knotsketch
 ;D
SR

SS369

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2048
Re: Another Step Forward
« Reply #63 on: January 18, 2009, 03:49:29 PM »
Is there anyway to make tiles that will allow an angled path(s)?
I vote for KnotPath.
Ooops, that isn't in the list.   ;-)

SS

DerekSmith

  • IGKT Member
  • Sr. Member
  • *****
  • Posts: 1573
  • Knot Botherer
    • ALbion Alliance
Re: Another Step Forward
« Reply #64 on: January 18, 2009, 07:46:21 PM »
Dave,

I am so glad you are a knot tyer and also a professional programmer.

You have moved this little utility on so far in just a matter of days.  The advantage of having another perspective in play is also wonderfully demonstrated.  Suddenly the whole utility feels much more 'in control' with the inclusion of tools like 'Undo' and disabling 'Save' until there is something to save ! 

By parsing the diagram and linking it to KT3D, you have started the next evolutionary stage of this utility - visualising the knot in 3D.  It seems as though KT3D has a number of issues to be resolved before it fully satisfies the needs of 3D visualisation and loading, but it is a marvellous jumping in point.  You said that you are refactoring KT3, have you obtained the source code?

Your 'tiny' enhancement of 'spinning' a cell using CTRL plus 'click' has improved usability by an order of magnitude.  Now instead of selecting all the right curves and right crossings, I simply place the same curve wherever I need a corner and any crossing wherever I need a crossing, then spin them around to the right orientation.  Massively faster than going and clicking on the correct corner they placing it.  It also allows me to 'play' with a structure so easily.  It is truly a massive leap forward in usability short of moving to face clicking.  Potentially, this means we can dump a load of tiles and run with just six, i.e. one of each 'sort'.;

I spotted a couple of issues, the behind spar lines do not rotate and, seemingly randomly, on the tiles pallet some of the tiles stay enlarged so it is possible over time to have three or four 'large' tiles present.  I have not sorted the logic behind this event yet.

I think I have learnt more in one day by reading your code than I have in the last three months.  For example, in one line

ShellExecute(Handle, 'open', 'http://www.abbott.demon.co.uk/knottyer3d.html', nil, nil, SW_SHOWNORMAL);

You showed me the right way to launch the library.  Because I did not know how to do this, I had created a rather simplistic browser and displayed the library within it, but now the library form can be disposed of and we can utilise the users default browser.  Could you pop this code in for me (I think around line 390 in FCB.pas) to replace the existing Button1Click procedure.

procedure TForm5.Button1Click(Sender: TObject);
//call up the webbrowser with the binsig url.
var
LibraryUrl : PAnsiChar;
begin
   LibraryUrl:= PAnsichar('http://theknotlibrary.wikidot.com/'+form1.compsig(binarySig));
   ShellExecute(Handle,'open',LibraryUrl, nil, nil, SW_SHOWNORMAL);
end;


I also learnt about the type PAnsichar while I was at it - woohoo.

In terms of updating the code.  I do not mean to impose on you, but would you be happy with doing this for a while, as you are likely to be making far more changes than I can and I can always post my tiny pieces of code for you to splice in (there, a knotting term to keep the post legit).

As for a name, the utility is already far more than just a drawing program.  It computes Overs Index and the Binary Signature and allows the user to look up the knot in the Knot Library just from its structural signature, and now it is moving into 3D visualisation.  It would be nice if the name could more capture the essence of all the parts which the utility has and will in time hopefully come to include.  However, the simple 'KnotPath' has the right connotations perhaps, although so would KnotMaker or KnotFinder ?

Well Done Dave, you are a star.

Derek

DerekSmith

  • IGKT Member
  • Sr. Member
  • *****
  • Posts: 1573
  • Knot Botherer
    • ALbion Alliance
Re: Another Step Forward
« Reply #65 on: January 18, 2009, 10:18:19 PM »
Is there anyway to make tiles that will allow an angled path(s)?
I vote for KnotPath.
Ooops, that isn't in the list.   ;-)

SS

Scott, a method Dave and I have discussed called 'face clicking' might just be the answer to giving us the ability to add in diagonals.  I have long felt that not having a diagonal was quite a drawback and 'face clicking' plus 'corner clicking' could give us this facility.

Watch this space, but in the meantime have a play with the new FCB with the tile spinning tile functionality. 

DaveRoot

  • Exp. Member
  • ****
  • Posts: 145
    • The Most Useful Rope Knots....
Re: Another Step Forward
« Reply #66 on: January 18, 2009, 10:33:02 PM »
You said that you are refactoring KT3, have you obtained the source code?
I'm refactoring my KT3D parser logic, with the intention of using the new routines in GridProcessor.pas.  I don't have the source code for KT3D itself.


I spotted a couple of issues, the behind spar lines do not rotate and, seemingly randomly, on the tiles pallet some of the tiles stay enlarged so it is possible over time to have three or four 'large' tiles present.  I have not sorted the logic behind this event yet.
I was experiencing the issue of palette tiles sometimes staying enlarged, but I thought I had fixed it because I couldn't reproduce it after I made a minor change.  If you spot a pattern which consistently reproduces the problem, let me know!  I haven't worked on the spars yet, so I'll get that done soon.


Could you pop this code in for me (I think around line 390 in FCB.pas) to replace the existing Button1Click procedure.
Sure, I'll try to get that done in the next day or two.


In terms of updating the code.  I do not mean to impose on you, but would you be happy with doing this for a while, as you are likely to be making far more changes than I can and I can always post my tiny pieces of code for you to splice in (there, a knotting term to keep the post legit).
I don't mind making the updates (okay, I'm enjoying it!), and "splicing in" (LOL) your pieces of code.  The only issue will be finding/making the time to work on it.


As for a name, the utility is already far more than just a drawing program.  It computes Overs Index and the Binary Signature and allows the user to look up the knot in the Knot Library just from its structural signature, and now it is moving into 3D visualisation.  It would be nice if the name could more capture the essence of all the parts which the utility has and will in time hopefully come to include.  However, the simple 'KnotPath' has the right connotations perhaps, although so would KnotMaker or KnotFinder ?
I was leaning towards KnotSketch, which conveys the drawing aspect of the tool.  However, it doesn't capture the other functionality.

KnotPath and KnotFinder convey certain aspects of the tool, but to me they don't conjure up an image of being able to make diagrams of knots.

Since the tool allows a person to make a drawing of a knot, and it can make a KnotTyer3D version of a knot, and it can make an Overs Index, and it can make a Binary Signature (see where I'm going with this yet?)....I think that KnotMaker best captures most of the functionality.

Dave

SS369

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2048
Re: Another Step Forward
« Reply #67 on: January 19, 2009, 12:48:05 AM »
I've been giving it a run and enjoying the learning curves. Pretty cool.
I hope the diagonal tiles come into being.
I need an erase function, because if I've worked a knot and then find that deep into it a mistaken routing, I've had to dump it all and start again.
Also I have not found/figured out the tile spinning. I must be over looking it.
I think I have the latest version = 4.30.
And perhaps as the bugs and mods are done, there will be a version that will have smaller tiles for more complex/bigger knots.

SS
« Last Edit: January 19, 2009, 12:49:53 AM by SS369 »

DerekSmith

  • IGKT Member
  • Sr. Member
  • *****
  • Posts: 1573
  • Knot Botherer
    • ALbion Alliance
Re: Another Step Forward
« Reply #68 on: January 19, 2009, 12:53:36 AM »

Since the tool allows a person to make a drawing of a knot, and it can make a KnotTyer3D version of a knot, and it can make an Overs Index, and it can make a Binary Signature (see where I'm going with this yet?)....I think that KnotMaker best captures most of the functionality.

Dave


And as I have used it to make a couple of knot structures to fit a specific need, then it definitely feels like we are making some headway in coming up with a name !!

Derek
« Last Edit: January 19, 2009, 08:16:13 AM by DerekSmith »

DerekSmith

  • IGKT Member
  • Sr. Member
  • *****
  • Posts: 1573
  • Knot Botherer
    • ALbion Alliance
Re: Another Step Forward
« Reply #69 on: January 19, 2009, 12:59:28 AM »
I've been giving it a run and enjoying the learning curves. Pretty cool.
I hope the diagonal tiles come into being.
I need an erase function, because if I've worked a knot and then find that deep into it a mistaken routing, I've had to dump it all and start again.
Also I have not found/figured out the tile spinning. I must be over looking it.
I think I have the latest version = 4.30.
And perhaps as the bugs and mods are done, there will be a version that will have smaller tiles for more complex/bigger knots.

SS

To delete a tile, just right click on a blank square to select it, then paint (left click) the blank tile over any mistakes and it wipes them out.  You can use right click to select any tile from the already drawn diagram and then continue painting with it.

To spin, hold down the control key then left click on the cell you want to spin - it works for elbows, crossings and lines - Isn't that Dave a clever bugger !!

And yes, a 'Zoom Out' facility is on the ToDo list.

Derek

SS369

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2048
Re: Another Step Forward
« Reply #70 on: January 19, 2009, 01:19:20 AM »
Yes Derek, he is a clever one, but then so is you.
Thanks for the pointers!
They all work !!!

SS

DerekSmith

  • IGKT Member
  • Sr. Member
  • *****
  • Posts: 1573
  • Knot Botherer
    • ALbion Alliance
Re: Another Step Forward
« Reply #71 on: January 19, 2009, 10:26:17 PM »
Today we have a 'side based' drawing scheme - a line comes in one side of the grid square and goes out one of the other sides.

We number the sides 1 though 4, so a cord might come in side 1 and go straight across and out side 3, or it might curve up and go out side 2 or curve down and go out side 4.

If we include diagonals, then we have to add in the corners (number them 5 through 8 ).  Now as well as going through the sides, a cord can come in through a corner and go out any corner or side, a bit like this --



Today, an OH might look like this with just face connections



But if we implement corner access as well we could draw like this ...



The question is  --  is it a worth while enhancement?

Derek

« Last Edit: January 20, 2009, 04:38:40 PM by DerekSmith »

DaveRoot

  • Exp. Member
  • ****
  • Posts: 145
    • The Most Useful Rope Knots....
Re: Another Step Forward
« Reply #72 on: January 20, 2009, 12:10:08 PM »
For me, the diagonals are more of a help in visualizing the knot than I had expected.  I'd say it's a worthwhile enhancement.

Dave

DerekSmith

  • IGKT Member
  • Sr. Member
  • *****
  • Posts: 1573
  • Knot Botherer
    • ALbion Alliance
Re: Another Step Forward
« Reply #73 on: January 20, 2009, 07:09:01 PM »
OK Dave, but in that case, then might I suggest that we take a new approach to drawing the cells based on orientation plus the basic moves

across face to face,
face crossing,
across corner to corner,
corner crossing,
quarter turn,
knight move (face to corner, left and right)
WEnd,
Spart / loop return,
Behind spar.

Nine face connection options (four faces, four corners and the middle), and ten shape options.

If we build a new drawing procedure from this basis, then we can design in the option to scale at the same time.

We would need to hand it the cell coordinates, style, face coordinates, cord No. and zoom level.  Perhaps this warrants a new unit?

Thankfully you are driving this forward now with your professional skill level, so it stands a good chance of becoming a reality.

Derek

PwH

  • Full Member
  • ***
  • Posts: 75
Re: Another Step Forward
« Reply #74 on: January 20, 2009, 10:55:25 PM »
Well done all you guys who actually understand all this!  (I used to be quite good in Sinclair Basic all those long years ago!)  ;)  I would just like to vote for the diagonal enhancement- I can see immediately that it's an OHK without having to squint and look sideways as I do with the 'squared off' version. I for one would be infinitely more inclined to use the app with this visualisation style. Keep up the good work Derek et al.
« Last Edit: January 20, 2009, 11:27:16 PM by PwH »
Is a Round Turn just a Grossly Overfed Seabird?