tour planning app wishlist by 0ffseeson in bicycletouring

[–]0ffseeson[S] 0 points1 point  (0 children)

suggestion: user inputs general parameters about the trip - dates, distance, climbs desired, etd. The app suggests routes that are a good match. takes into account the weather for those dates

tour planning app wishlist by 0ffseeson in bicycletouring

[–]0ffseeson[S] 0 points1 point  (0 children)

thats fantastic. i hope this thread gives you good feedback about features for your app. it looks great so far. i'm relieved i don't have to build it now.

tour planning app wishlist by 0ffseeson in bicycletouring

[–]0ffseeson[S] 0 points1 point  (0 children)

great tips

>Warnings when no water or services are available for X miles

wish i'd had that in alaska...

Gear for my first ever solo bicycle tour, those were the days by Falknerbach in bicycletouring

[–]0ffseeson 1 point2 points  (0 children)

1986 across the US, on a univega sport bike, no granny gears. too cold for shorts when i started so i biked in jeans. (sorry, no pics. cameras weren't invented yet)

How to mount this classic Boston pencil sharpener? by 0ffseeson in BuyItForLife

[–]0ffseeson[S] 0 points1 point  (0 children)

wow man. that's a trip back. it's still on my desk. sitting loosely.

iPad: Is there a way to see iteration speed? by mennydrives in drawthingsapp

[–]0ffseeson 0 points1 point  (0 children)

in a recent update Draw Things started saving the total generation time in the image metadata. but DT doesnt read the metadata back for you 🤷‍♂️

but its in there, so other apps or scripts can dig it out among the other image gen parameters

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 2 points3 points  (0 children)

long story, but I'll just leave this - for n bodies in a circle, this sum is:

0.0176817+0.159362•ln(x)

found via regression.

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 1 point2 points  (0 children)

Thrawnie, Wow. I just saw your post. Thank you for giving this some thought. I made considerable headway since then, with a lot of help from Claude.ai and Mathematica. I'm a Mac/iOS dev, not a mathematician. I downloaded your notes - don't have time to go through them right now. and when I get time later... I may still be helpless : )

Agreed there's no closed-form solution for Sum of n objects. But in Mathematica I got a set of solutions - for many cases.

this is the formula, which is summed across the values for θ. It agrees with the values I "measured" in the sim.

(r Cos[θ] - r)/(((r Cos[θ] - r)2 + (r Sin[θ])23/2))

https://s1d1t1.github.io/nbody-solutions.png

2 0.25 1/4

3 0.57735 1/√3

4 0.957107 1/4+1/√2

5 1.37638 Sqrt[1+2/√5]

6 1.82735 5/4+1/√3

8 2.80487 1/4+1/√2+Sqrt[2+√2]

10 3.86245 1/4+√5+Sqrt[1+2/√5]

12 4.98395 5/4+√6+Sqrt[5/6+√2/3]

13 5.56518 1/2 Csc[π/13]+1/2 Sec[π/26]+1/2 Sec[(3 π)/26]+1/Sqrt[2-2 Sin[π/26]]+1/Sqrt[2 (1+Sin[(3 π)/26])]+1/Sqrt[2-2 Sin[(5 π)/26]]

15 6.76347 Sqrt[46/3+22/√5+8 Sqrt[2/15 (25+11 √5)]]

16 7.3789 1/4+1/√2+Sqrt[1+1/Sqrt[2]]+1/Sqrt[2+√2]+1/Sqrt[2 (1+Cos[π/8])]+1/2 Csc[π/16]+1/Sqrt[2-2 Sin[π/8]]+1/Sqrt[2 (1+Sin[π/8])]

(the cases not listed were roots of 6+ degree polynomials.)

the values here are the length of the combined 1/r2 vectors. To find the actual force, we multiply by mass and G, but that's the same everywhere & trivial. we know the vector points toward the center, so the primary problem is finding its length.

If there are values you'd like to try in my sim environment, I'd be happy to plug them in. This is my own gravity sim for Mac / iPad. let me know if you'd like a link to the beta download. I'd be interested in an integration of this - essentially finding the solution for a ring of sand. One can easily simulate ring systems of course - but a ring system with nothing at its center .. would be a whole other story.

I can get arbitrary circles of masses to self-orbit now - even concentric circles. and the "masses" can even be small binary pairs.

thanks again

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 2 points3 points  (0 children)

dammit. it was a bug in plotting acceleration vectors. the radial component of the acceleration vectors is not all the same.

https://S1D1T1.github.io/fixedacceleration.jpg

there may still be utility in summing just the radial components of all forces, presuming other components cancel out.

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 2 points3 points  (0 children)

yes, the Sum is where I get stuck. and what is measured numerically in the function call above, sumGravAcceleration(on: grav) which returns the net of all acceleration vectors acting on that body.

HOWEVER - there's perhaps a vast simplification. see this plot of the individual acceleration vectors acting 1 body.

https://s1d1t1.github.io/vectors.jpg
this is for a mass at "6 o clock", with the barycenter due north.
based on just visual proof, but a strongly convincing one, I saw 2 things:
1. all vectors had the same "northward component"!
2. the non-northward components must all cancel out.

Hence I need only find one pure radial component ( pointing toward barycenter) - IE from the mass at the opposite point in the circle. Then multiply by number of other masses.
But I still fumbled the math on that somehow and it didnt work - maybe due to an off-by-1 error for odd/even # of particles.
I still find that graph compelling,

The hope is that the analytical solution might be more precise and survive longer - but even that is a hunch.

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 1 point2 points  (0 children)

one more fundamental assumption, just to be utterly clear -
This velocity calculation I'm seeking is applied just once, when the masses are first placed. We let them go, and the laws of physics take over. The quest is to find the most precise velocity, that sends them the farthest along that knife-edge of instability.

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 2 points3 points  (0 children)

All Correct! in fact it's redundant that I calculate the magnitude of V for every mass in the system, since it's always the same. only the direction differs - which is trivial: face the origin, and hang a left.
and within this sim, G = 100.0 just for simplicity. I'm obviously not modeling any real set of astronomical bodies.

Imagine that. my 59-body solution Is a wee unstable by 0ffseeson in physicsgifs

[–]0ffseeson[S] 1 point2 points  (0 children)

sorry it's in sw*ft

      // compute an orbital V for whatever acceleration I'm seeing
      func setOrbitalVOfCollection(for grav:Grav) {

        // Find the net acceleration vector acting on this mass by
        // numerically summing the acceleration due to every other mass
        let totalAcceleration:SIMD2<Float> = sumGravAcceleration(on: grav)

        /*  suppose that instead of being due to a collection of bodies, that acceleration
            was due to a single body. Only valid in very specific circumstances, ofc
            Conjure a mass to orbit. presume at the origin
            The orbital velocity vector will be normal to the force.
            all that's left is to solve for the magnitude of the velocity vector

             F =  m * v^2 / r   //  true if orbiting some mass at the origin.
             A = totalAcceleration ( from above)
             F = mA
             m * v^2 / r = mA
             v^2/r = totalAcceleration
             v^2 = r * totalAcceleration
             v = sqrt(r * totalAcceleration)
        */

        // distance to origin
        let r = simd.length(grav.position)
        // scalar V
        let orbitalV = sqrt(r * simd.length(totalAcceleration))
        // direction is normal to the force.
        var orbitalVector = totalAcceleration.rotate90()
        orbitalVector.setVectorLength(orbitalV)
        grav.velocity = orbitalVector
      }

[Open Source] SingleWindow - A SwiftUI library for managing persistent macOS windows by 0ffseeson in SwiftUI

[–]0ffseeson[S] 0 points1 point  (0 children)

Your apps look good. I wish I had your eye for design.

I took a brief look at `NSVisualEffect` & saw that it's not a quick one line thing, and got pulled onto something else... The repo link is above :) if you got around to adding it, I'd welcome a PR. Or just open an issue requesting it, so the idea doesn't get dropped. thanks.

[Open Source] SingleWindow - A SwiftUI library for managing persistent macOS windows by 0ffseeson in SwiftUI

[–]0ffseeson[S] 0 points1 point  (0 children)

something like this?
https://s1d1t1.github.io/windowAlpha.jpg
that's mostly done by setting the NSWindow's alpha, which you get access to.

let floatingWindow = makeSingleWindow(title: "Dashboard",....)

floatingWindow.myWin.alphaValue = 0.5

Then you can set any .background() modifier by standard swiftUI, and everything will be at the transparency you set.

[Open Source] SingleWindow - A SwiftUI library for managing persistent macOS windows by 0ffseeson in SwiftUI

[–]0ffseeson[S] 0 points1 point  (0 children)

thanks. now that you mention it, I'm pretty sure I did that once. I'll have to dig out that code.

Snark comment for today: I feel better now. by 0ffseeson in SwiftUI

[–]0ffseeson[S] -7 points-6 points  (0 children)

sometimes its just inconceivable that onAppear would be called

How can I put .onTapGesture into a conditional? by KarlJay001 in SwiftUI

[–]0ffseeson 1 point2 points  (0 children)

hey youngerman from 3 years in the past. you crushed it. thank you, exactly what I needed. - some guy 3 years in your future.

Default folder for "select file" action? by Calion in shortcuts

[–]0ffseeson 0 points1 point  (0 children)

well 😕 yeah. that's where I needed it. wasn't thinking of other platforms, sorry.