If you look at the segments, you will notice that they always have the same spatial distance to those with next or previous index.
According to each segment, you can give two spatial angles (x- and y-rotation) to get the spatial position of the next segment.
On blank (or denovo) puzzles (like in some contests), the angles of each segment are (0,0)
I thought it would be cool to experiment by changing backbone positions by giving two angles,
maybe with a function like set_segment_angle(index,angle1,angle2).
Doing it this way, you could quickly make a denovo puzzle by:
for index=2,get_segment_count() do
set_segment_angle(index,0,0)
end
You could also use this to flatten out areas.
regards,
Alex
Creating helices would also be simple:
for index=startindex,endindex do
set_segment_angle(index,pi()/2,pi()/4)
end
This function could unify aligning and rebuild.
Going from segment to segment then is like riding on a roller coaster, you just have to find the perfect angles.
It's a similar principe like Tlaloc described to apply bands to "open air" by script in Wiki.
In this diagram, white arrows are segment directions, blue arrows are spatial axes.
Numbers are segment indices.
If angles and sidechain snap positions would be getable by script, you could create your own puzzle savestates by saving them in a table.
Loading them would just be changing all backbone angles and sidechain snap positions how they have been stored in the table before.
Now I understand why banding adjacent segments is impossible and doesn't make sense:
Imagine your hand is one segment, elbow is seond segment, and shoulder is third.
You can change the distance from hand to shoulder, but not the distance from hand to elbow or elbow to shoulder.
Distance between each segment is always about 3.8 units.