robertconnelly / symmetric-tensegrity

A program to display tensegrities that are highly symmetric.
https://robertconnelly.github.io/symmetric-tensegrity/
GNU Affero General Public License v3.0
5 stars 1 forks source link

C1, C2 and S1 lengths need investigation #19

Open robertconnelly opened 5 years ago

robertconnelly commented 5 years ago

It's not clear what the different lengths for C1, C2 and S1 correspond to. These could be fine but it's a little non-intuitive since S1, for example, could be normalized to 1 and the others chosen appropriately.

A resolution to this issue is either justification for why the lengths are chosen the way they are, potentially with some indication about what they represent and why on the application, or some resolution the lengths that is reasonable.

It could be that the vertices all lie on a unit sphere and that's the reason for having the different C1, C2 and S1 lengths chosen the way they are. If that's the case, confirm and put a message somewhere on the website that this is what's happening.

abramconnelly commented 5 years ago

In src/symtens.js, the data structure mx has the "generators" which are used to construct the vertices. I haven't gone in depth with each one but it looks from a cursory glance that they are normalized to unit length (see symtens.js, line 262).

In js/symtens-display.js, line 322, there is a calculation to populate c1_length, c2_length and s1_length. Here's one such calculation:

  if (tenz.C1.length > 0) {
    var len = numeric.norm2(numeric.sub(tenz.C1[0][0], tenz.C1[0][2]));
    $("#c1_length").text(len.toString().substr(0,6));
  }

I believe the C1, C2, and S1 arrays hold three points per entry, with each entry being a line composed of three points. The length is then the difference between the end of the line segment and the beginning, which is, if I'm correct, what's being represented above.

So this resolves the issue of whether the vertices lie on the unit sphere (it looks like they do) and what the C1, C2 and S1 lengths are. What remains for this ticket is to put in a message somewhere on the interface indicating the vertices lie on a unit sphere.

robertconnelly commented 5 years ago

Yes, I think that we were right. The lengths of all the members are scaled so that each point lies on the unit sphere. So in particular all the lengths of all the members are less than or equal to 2, and a member length is exactly 2 if and only if it goes through the origin. Similarly a regular n-gon has its side lengths lengths at most equal to 2\sin(Pi/n), with equality if and only if its center is at the origin. For n=2,3,4,5,6 these lengths are 2, 1.732, 1.414, 1.176, 1.000, respectively.

It seems natural to put this information in the FAQ. What do you think?

LD, LM On Jul 13, 2019, at 1:17 PM, Abram Connelly notifications@github.com<mailto:notifications@github.com> wrote:

In src/symtens.js, the data structure mx has the "generators" which are used to construct the vertices. I haven't gone in depth with each one but it looks from a cursory glance that they are normalized to unit length (see symtens.js, line 262https://github.com/robertconnelly/symmetric-tensegrity/blob/a88618f7cedb664b8f87d94679573705dea80b96/src/symtens.js#L262).

In js/symtens-display.js, line 322https://github.com/robertconnelly/symmetric-tensegrity/blob/a88618f7cedb664b8f87d94679573705dea80b96/js/symtens-display.js#L322, there is a calculation to populate c1_length, c2_length and s1_length. Here's one such calculation:

if (tenz.C1.length > 0) { var len = numeric.norm2(numeric.sub(tenz.C1[0][0], tenz.C1[0][2])); $("#c1_length").text(len.toString().substr(0,6)); }

I believe the C1, C2, and S1 arrays hold three points per entry, with each entry being a line composed of three points. The length is then the difference between the end of the line segment and the beginning, which is, if I'm correct, what's being represented above.

So this resolves the issue of whether the vertices lie on the unit sphere (it looks like they do) and what the C1, C2 and S1 lengths are. What remains for this ticket is to put in a message somewhere on the interface indicating the vertices lie on a unit sphere.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/robertconnelly/symmetric-tensegrity/issues/19?email_source=notifications&email_token=AIRXJSVTGQ4NX4GH67B67L3P7IEZ7A5CNFSM4H55AQG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ3VZ4A#issuecomment-511139056, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIRXJSRENCPROX63OZQYWZLP7IEZ7ANCNFSM4H55AQGQ.