CAD and the Math behind weaves
View previous topic | View next topic >
Post new topic Reply to topic
M.A.I.L. Forum Index -> Weaves Discussion
   
Author Message

Joined: August 05, 2010
Posts: 599
Submissions: 28
Location: Bar Harbor, ME, USA

CAD and the Math behind weaves
Reply with quote
Posted on Thu Sep 26, 2013 7:47 pm
Link to Post: Link to Post

I started thinking more and more about some of the weaves in the library. What is the math behind them, and how does it change based upon ARs.

I've since started a slightly more public project to create a virtual library of weaves I have looked at and understood.

Purpose:
CAD based tutorials are superb, but I think they could share even more information. What about creating a virtual 3D object that someone can look at from different angles? What about the underlying math that was done for ring positioning? How will a weave look differently with a specific AR?

Why not share both the mathematical generation code and the parametric models to everyone so that weaves can be understood?

Software Selection:
I decided to use OpenSCAD as the CAD program for this project.
Why? Two main reasons.
1. It is fairly easy to pick up. The only difficult part is understanding the formatted order of operations (Send me a PM if you want help to understand it better).
2. There is another website called Thingiverse which specializes with sharing things that can be printed with 3D printers. An interesting feature of their site is that specifically formatted OpenSCAD scripts can be parameterized and executed through a web interface. (Actual cross-platform installed program allows for more viewing controls, but web-based you can still change views.)

Now the interesting thing is that I can share my code as well as allow anyone to make/view models without too high of a learning curve.

So far I've started with some basics, but I plan on really expanding this library in the future.

The link to my virtual model weave library can be found here.
As of right now, it only has 3 weaves - including E4:1, Spiral4:1 and JPL. The math behind JPL was very interesting.

Now I'm sharing this because it may interest some people. For use, for adding, for sharing information. If you want me to study a weave, ask me. If you want to add a weave that you have already studied but don't understand the CAD part, ask me.

If you wish to make your own tutorials personal tutorials using my code, go right ahead (Everything on thingiverse from me is set to CC Attribution - You only have to mention that you got code from me!)

I guess this will probably become more interesting when I add more and more weaves.


while(!project.isFinished())
project.addRing();
// Maille Code V2.0 T7.1 R5.6 Eo.n Fper MFe.s Wsm Caws G0.8-1.6 I2.4-8.0 Pn Dcdejst Xw1 S07

Joined: February 8, 2013
Posts: 737
Submissions: 61
Location: Australia

Reply with quote
Posted on Thu Sep 26, 2013 10:49 pm
Link to Post: Link to Post

This is a great idea!

I'm afraid I don't have the brainspace at the moment to figure out this CAD stuff, but let me wave pom-poms with enthusiasm!

When you say "study a weave", what exactly do you mean? I wrote an article about Japanese Bullseye, but it wasn't a deep analysis. I do have a continuing interest in figuring out things about weaves where just knowing the AR is not enough. Would that kind of thing be helpful?


Craft isn't cheaper than therapy, but it's more fun.
http://www.essence-of-eclectic.com

Joined: August 05, 2010
Posts: 599
Submissions: 28
Location: Bar Harbor, ME, USA

Reply with quote
Posted on Fri Sep 27, 2013 1:46 am
Link to Post: Link to Post

kerravonsen wrote:
When you say "study a weave", what exactly do you mean?


Understanding the math behind the ring interactions. So far, I'm starting with single AR weaves but will likely expand to multiple ones. Dragonscale is definitely on the list that I want to first attempt with multiple WD+AR rings.


while(!project.isFinished())
project.addRing();
// Maille Code V2.0 T7.1 R5.6 Eo.n Fper MFe.s Wsm Caws G0.8-1.6 I2.4-8.0 Pn Dcdejst Xw1 S07

Joined: October 22, 2010
Posts: 680
Submissions: 388
Location: Yucaipa, CA

Reply with quote
Posted on Fri Sep 27, 2013 11:45 am
Link to Post: Link to Post

i had a chance to play with this a little - just manipulating some fields and spinning the image. i really like this. thanks for posting. i had this idea a while back that someone could make holograms of weaves and manipulate them like you've done so people could get the step by step visual of a tutorial in 3d. perhaps your information could be used to generate that hologram?

i'm in the process of writing a book on weaves right now and i only have pictures of final weaves - making it a catalog of sorts. my full vision and dream would be to have a book that had a hologram on each page that popped up showing the full 3d image of a weave and it's tutorial. i don't know how far fetched that is though.

my brain works mostly in 3d images or holograms. most people hear a voice in their head all day - i see holograms. since my brain works this way automatically, i don't require tutorials in order to learn a weave. i can tear a weave apart by visualizing it's components. i imagine most advanced chainmaillers know what i'm talking about. i'm split on whether tutorials are a crutch or not. on one hand, they offer valuable information that beginners need. on the other hand, they are addictive and people tend to be less creative when depending on them. perhaps there is no good or bad in tutorials, there is just how people use them.

anyways, great work on this. i look forward to seeing more weaves and playing with them.



Joined: August 05, 2010
Posts: 599
Submissions: 28
Location: Bar Harbor, ME, USA

Reply with quote
Posted on Thu Oct 03, 2013 5:46 pm
Link to Post: Link to Post

Yes, this could theoretically be used as information for a holographic image. The information generated is a form of 3D object.

Latest list of weaves CAD'd up are:
European 4 in 1, Jens Pind Linkage, Spiral 4 in 1, Box Chain 4 in 1, Byzantine, Power Line

I started doing weaves with various subroutines such as paired angled rings, so that future combinational weaves become much easier to generate.


while(!project.isFinished())
project.addRing();
// Maille Code V2.0 T7.1 R5.6 Eo.n Fper MFe.s Wsm Caws G0.8-1.6 I2.4-8.0 Pn Dcdejst Xw1 S07

Joined: February 8, 2013
Posts: 737
Submissions: 61
Location: Australia

Reply with quote
Posted on Thu Oct 03, 2013 10:39 pm
Link to Post: Link to Post

mithrilweaver wrote:
my brain works mostly in 3d images or holograms. most people hear a voice in their head all day - i see holograms. since my brain works this way automatically, i don't require tutorials in order to learn a weave. i can tear a weave apart by visualizing it's components. i imagine most advanced chainmaillers know what i'm talking about. i'm split on whether tutorials are a crutch or not. on one hand, they offer valuable information that beginners need. on the other hand, they are addictive and people tend to be less creative when depending on them. perhaps there is no good or bad in tutorials, there is just how people use them.

I think it depends on the weave.

  • Some weaves are very clear and open in their structure, so even a newbie like me can figure them out by looking at them; e.g. Circles, Hikaru, Sunrise
  • Some weaves are unstable and difficult to start, and need tricks and tips to assist in doing so. Half Persian 4 in 1 is a classic example of this.
  • Some weaves are very dense and close in their structure, so a mere photograph isn't enough to discern the structure, because rings get hidden by other rings, so you can't see how they go together, no matter how hard one stares at the image and re-reads the description, at least for poor souls like me who don't think in holograms. Abstain has driven me bonkers! Sometimes weaves in this category can be clarified by a weave sample in multiple colours, where links with different roles in the structure are distinguished by being in different colours. For example Half Persian 3 in 1 Spine, Snapdragon and Trees are made clearer in the weave library because the canonical samples are in multiple colours.
  • Some weaves are simply difficult, such as Jens Pind Linkage, whether that be in figuring out how to link the rings the right way, or in keeping track of which ring goes where. Sure, once one has done the weave, one can do it again, but I don't think tutorials for such weaves are a crutch.



Craft isn't cheaper than therapy, but it's more fun.
http://www.essence-of-eclectic.com

Joined: January 17, 2013
Posts: 373
Submissions: 5
Location: Probably in the garage...

Reply with quote
Posted on Sun Oct 06, 2013 2:43 pm
Link to Post: Link to Post

My math really sucks but something keeps standing out at me when looking at the math used to determine the volume of the rings, in the various tools that have come up recently. Some calculations are based on the ID of the ring where as others use the MD of the ring. The results seem to be same as the math is pretty simple to go from one to the other but knowing how computers sometimes oddly interpret things and or round numbers out. I wonder if something is being changed just enough to affect how the edges line up.
Let me be very clear again, my math sucks.

In searching around for a simple way to calculate the volume of a ring which is a torus, lead me down a few different paths.

For example purposes let say we have a ring with the following dimensions in thousands of a inch:

WD=0.050
ID=0.200
MD=0.250 result of "ID+WD" or "ID+(2*(WD/2))"
OD=0.300 result of "ID+(WD*2)" or "ID+(4*(WD/2))"

Results for the MD and OD should be the same either way but as anyone that's coded enough knows there are multiple ways to do most things but sometimes only one of them works exactly the way you expect, with that in mind lets move on.

First I found " Volume=(Pi squared * ID * WD squared)/4 " which =0.0012337.

Next I found " Volume = 2 * Pi squared * MD * WD squared " which also gave me =0.012337.

Ok, the math seems to work either way but AFAIK when a computer generates a torus it does so by creating a circle with a radius of R then positions the center of another circle with a radius of r around the previous circle. R equates to the MD and not the ID of the torus.

Is it possible that when using the ID something in the math is being rounded off enough to affect how the software interprets and then draws using the MD value or R?

Then I ran into this amusing article over at the UW math department site. The .PDF seems to only half load from time to time, refresh/reload as needed.

Example #3 Slip out the back, Jack is a much more involved way (yet the simplest of the calculus examples) to derive the torus volume compared to my two previous examples but given just how incredibly sensitive mail is to size variations, could going to this level resolve the issue? e.g. 4-1 should work down to 2.9 but fuses at 3.3 or lower.

I can't figure out the some of math involved to see if it still comes out to 0.012337 or not, maybe someone else with the know how could do this. To me it seems like a precision issue either with the math itself or what the program is doing to the math in the background.

While we all know mail is just a bunch of rings, if you've been at it long enough you've come to realize just how complex things can get and what drastic effects a small change in AR can have. For as great as computers are they still have trouble dealing with these sorts of complexities accurately.

On that note, I have to presume the AR could also be affected by the same math issue, if present. The example ring has an AR of 4 if measured from the ID but an AR of 5 if taken from the MD. I know we use ID and computers "should" use the same ID but maybe something is going wrong when doing so just enough to nudge the math and rings out of place.

I'm probably grasping at straws but maybe this will spark an idea in someone else more mathematically inclined than myself.

On another note OpenSCAD is pretty cool, it's easy to use and the wiki seems well written and maintained. Sadly it's only single-threaded. It still pulls off decent render times for small items it just won't benefit any from extra CPU cores. Under Linux there doesn't seem to be any syntax highlighting but that's a minor issue given the simplicity of the code involved.

FYI: Rendering an 8x8 sheet of E4-1 with $Fn=40, took 1.5hrs and ate all 4GB of available RAM, making my laptops quite catatonic until I closed out of OpenSCAD both in Win7 and Tux Mint15. The memory requirements are significant with =<4GB of RAM, I would keep the rows and columns down to a minimum unless of course you want to kill your HDD by paging it to death.

Also of note, the Thingview while very cool, causes some serious processor usage in Firefox (likely any browser) and will slow your browser down if left open. Similar to CIGP it's an example of something that pushes the envelope for what a browser can do.

Good job on the weaves you've created thus far TCG I look forward to playing with more of them, especially now that I've found out I may have access to a 3D printer.


Mostly Harmless

Joined: August 05, 2010
Posts: 599
Submissions: 28
Location: Bar Harbor, ME, USA

Reply with quote
Posted on Sun Oct 06, 2013 4:01 pm
Link to Post: Link to Post

Levi wrote:
Also of note, the Thingview while very cool, causes some serious processor usage in Firefox (likely any browser) and will slow your browser down if left open. Similar to CIGP it's an example of something that pushes the envelope for what a browser can do.

Good job on the weaves you've created thus far TCG I look forward to playing with more of them, especially now that I've found out I may have access to a 3D printer.


Yeah, thats why I listed the CAD software I'm using. You can download the script that generates it and have much nicer control with lower end computers. High end computers struggle with the thingview still with the exception of simple objects. I'll get to answering your other questions after I get back from shooting things with arrows.


while(!project.isFinished())
project.addRing();
// Maille Code V2.0 T7.1 R5.6 Eo.n Fper MFe.s Wsm Caws G0.8-1.6 I2.4-8.0 Pn Dcdejst Xw1 S07

Joined: March 12, 2003
Posts: 3058
Submissions: 74
Location: Tawas City

Reply with quote
Posted on Sun Oct 06, 2013 6:49 pm
Link to Post: Link to Post

Umm interesting, i do alot of my CG by eye vary little is done with the crazy thing called math. but still good to know. i've been playing with OpenSCAD since it was released, i've even add some code to it. vary good tool for those that are inclined that way. not vary intuitive for an artist thou. the programing language they created for it throws a lot of people off it for FreeCAD, Blender, or some other more visual interaction software.

keep up the work TrenchCoatGuy, look forward to seeing more post on this.


var ar = 3.3m;
var material = "Copper";
var project = new Project();
var projectRings = 120000;
var Ring = 0;
while(true)
{
project.AddRing(ar, material);
Ring++;
if(Ring > projectRings) break;
}
//or somthing like that..Razz



maille Code V2.0 T8.3 R6.4 Ep.f Fper Mfe.s Wsg$ Cpw$ G0.25-2.5 I0.5-30 N31.31 Pa Dacdjw Xa27g37w1 S94

Joined: August 05, 2010
Posts: 599
Submissions: 28
Location: Bar Harbor, ME, USA

Reply with quote
Posted on Sun Oct 06, 2013 8:01 pm
Link to Post: Link to Post

Levi wrote:
The results seem to be same as the math is pretty simple to go from one to the other but knowing how computers sometimes oddly interpret things and or round numbers out.

*snip*

First I found " Volume=(Pi squared * ID * WD squared)/4 " which =0.0012337.

Next I found " Volume = 2 * Pi squared * MD * WD squared " which also gave me =0.012337.

*snip*


Although they look the same, the second one is 10x the first. Were these supposed to be the same? Also, the polar integral (as you mentioned example 3) evaluated should give the second volume equation, because the cross-section does not change:
Vol = 2Pi*MD*(AreaOfCircle), where AreaOfCircle = Pi*WD^2

Additionally, a tip for those that choose to open it in OpenSCAD that I forgot in my previous post:
To view the object, you only have to "compile" the code. If you wish to save the object to print, you need to "compile and render". The rendering does still take awhile, and I am wondering if there is some form of code optimization that could speed up this (past reducing the $fn value).


while(!project.isFinished())
project.addRing();
// Maille Code V2.0 T7.1 R5.6 Eo.n Fper MFe.s Wsm Caws G0.8-1.6 I2.4-8.0 Pn Dcdejst Xw1 S07

Joined: January 17, 2013
Posts: 373
Submissions: 5
Location: Probably in the garage...

Reply with quote
Posted on Sun Oct 06, 2013 9:01 pm
Link to Post: Link to Post

TrenchCoatGuy wrote:
Were these supposed to be the same?


/Levi puts the dunce cap on, again...

Yes, I thought the result was the same. I missed that extra zero, how I do not know but I did. I kept telling myself there was something wrong with it but I'll be damned if I could see it. Moving past my absurd inability to notice the difference between a 7 and 8 digit number, good thing I stayed away from accounting...
I'm glad at least one of them matches up to the polar integral as you call it which seemed pretty infallible given the source and the explanation.

So I must ask, is there any merit in using the polar integral method over the method in example two? Could this account for the loss of precision as things get smaller?


Mostly Harmless

Joined: August 05, 2010
Posts: 599
Submissions: 28
Location: Bar Harbor, ME, USA

Reply with quote
Posted on Sun Oct 06, 2013 9:21 pm
Link to Post: Link to Post

Keep in mind, I'm an engineer with familiarity to computer science and mathematics - Not a computer scientist or a mathematician.
Short answer: No precision should be lost.

I use the polar form because it makes the most sense to me. The object has circles, therefore I use the polar analysis.
As for the differences in precision, I would venture to guess that the one with the least number of integrals would be computationally easier for a computer (less time to calc). However, if the language that you do the integral is done correctly, you should get the same answer. (Numerical solutions to functions often have something called a "convergence criteria" which regulates when it thinks it is "close enough" to the real answer). Additionally, a trick often used with tiny things for numerical analysis is a simple scaling of units to avoid operation rounding. The math is the same if you use millimeters or if you use meters, you just have to make sure you get out the thing you are looking for (cubic millimeters or cubic meters).


while(!project.isFinished())
project.addRing();
// Maille Code V2.0 T7.1 R5.6 Eo.n Fper MFe.s Wsm Caws G0.8-1.6 I2.4-8.0 Pn Dcdejst Xw1 S07

Post new topic Reply to topic
Jump to:  
Page 1 of 1
All times are GMT. The time now is Tue Jul 23, 2019 11:50 am
M.A.I.L. Forum Index -> Weaves Discussion
Display posts from previous: