Hello, everyone,
I need your help for my future project.
I want to connect two points with each other with a line.
But the dots move differently in a circle! The line should always be connected to the two points, in other words the line will be compressed and stretched (like a rubber band).
Is that technically possible at all???
I would be grateful for any suggestion, tip and help
You should see if @Zieneth will help you . Look at his recent work you will be astounded . The other master is @bradtc . They are Busy People be Patient .
Make your WIP Inspectable. I guess you are using Rotation Formulas to move the dots. Paradoxically if you used the sin cos x y method yo would be part of the way there. What you are asking to do is remarkably Complex.
First I would replace your two balls with with orbital expressions so that you are not using rotating “hands” expressions to locate them.
That will give you two XY coordinates for the two balls, and then the distance between the two balls can be calculated with simple algebra to get the length of the line:
Hypoteneuse^2=deltaX^2+deltaY^2
Hypoteneuse=((deltaX^2)+(deltaY^2))^(0.5)
Use that to make a rectangle with the origin at the outer ball XY location, of height say 2 or however thick you want the line, then of the width calculated above.
Next you have to calculate the rotation angle using the atan formula.
rotation = atan(opposite/adjacent)
rotation =(atan((deltaY)/(deltaX)))
Be warned the expressions may get big and you can work them out in notepad++ and then paste it in. Use lots of brackets or else negative values will pop up giving weird results.
Also note the atan function now works on the watch, if you search atan in the forum, you get some crazy formulas, which work, but use atan now that it has been fixed in the watch app v6 onward.
hmmm, interesting…
I was just going to say, in geometry you would define a line by 2 end points, or a point and a vector, but in Facer it would be an element with one point, a length, and rotation. You have to think differently here… @bradtc : way to go!
Tom you are talking about a Cartesian Environment like CAD . XYZ . Unfortunately I do not know what the name is of what we do on Watches but it is all based on Radians from Centre Points . I hate radians . Oh well . I love the lesson that Brad Gives . That is exactly what we are supposed to do rather than diving in and sorting it with a test . All Brads work is inspectable and a fine working example of what he has outlined here . He is just to modest to blow his trumpet over it . If I was not so busy I would have a Go so this Becomes a Bookmarked topic for next Year . The Best Topics have The best Titles .
I have actually been working on drawing a line between orbiting objects. I absolutly use notepad when working with large equations. I’ll share here when I have something, unless you’ve got it
You can inspect this one. Pretty basic, but you’ll find the line pivots off center. This can be corrected by dynamically adding or subtrcting from the orbit- (line thickness/2).
Using the retange object also alows for a dynamic length.
You could use similar code (or this exactly) as is, becuse 1, the screen is pretty small, and 2, some creative masking would hide the wobble. Have fun
Oh dear, I had such mathematics about 35 years ago.
Hopefully I can still get this together… puh
Nice one Mr Zieneth Star… I see an X-ray vision of a V8. Thanks for sharing you Genius :::)))
BTW You did not really have to have the Dot in the centre to prove the Gag.
Yeah, the center dot was just a reference point.
Up next, the Pantagraph lol
Some pantograph hands to go with Square or Round Faces:::)))
@daredevill Check the battery hand on this one. The line changes size dynamically with the changing size of the battery indicator drawing to a spiraling point. Inspection is enabled so you can give it a good look. Please let me know what you think, I rarely get feedback other than from @russellcresser lol.
Looks amazing! I need more time to study the math… But just looking at the formulas it does not seem that complicated, it’s just ingenious. Well done!
Thank you for the feedback, I appreciate it
@Zieneth
Wow, amazing…
It comes pretty damn close to what I had in mind.
I’ll try to implement it tomorrow and replace it with minutes and seconds.
A very good job
I made this test like a year ago, does exactly what you want so it seems:
Wow… yes that’s exactly it… Thank you @ThaMattie .
Now I just have to provide the right balls with the right values and positions.
I made this one as a combination of a couple different ones. There is a cople tricks you’ll find.
Happy coding.
That Tourbillon is Really Flying. You are a Real Magician Sir. A real Privilege to be any where near such Genius :::)))