You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For detailed usage, please refer to [documentation](https://swiftgraphs.github.io/Grape/Grape/documentation/grape). A quick example here:
146
+
For detailed usage, please refer to [documentation](https://li3zhen1.github.io/Grape/Grape/documentation/grape). A quick example here:
147
147
148
148
```swift
149
149
importGrape
@@ -182,13 +182,13 @@ struct MyGraph: View {
182
182
183
183
### The `ForceSimulation` module
184
184
<details>
185
-
<summary>Refer to the <ahref="https://swiftgraphs.github.io/Grape/ForceSimulation/documentation/forcesimulation/">documentation</a> or expand this section to find more about this module.
185
+
<summary>Refer to the <ahref="https://li3zhen1.github.io/Grape/ForceSimulation/documentation/forcesimulation/">documentation</a> or expand this section to find more about this module.
186
186
</summary>
187
187
188
188
`ForceSimulation` module mainly contains 3 concepts, `Kinetics`, `ForceProtocol` and `Simulation`.
189
189
190
190
<palign="center">
191
-
<imgsrc="https://raw.githubusercontent.com/swiftgraphs/Grape/main/Assets/SimulationDiagram.svg"alt="A diagram showing the relationships of `Kinetics`, `ForceProtocol` and `Simulation`. A `Simulation` contains a `Kinetics` and a `ForceProtocol`.">
191
+
<imgsrc="https://raw.githubusercontent.com/li3zhen1/Grape/main/Assets/SimulationDiagram.svg"alt="A diagram showing the relationships of `Kinetics`, `ForceProtocol` and `Simulation`. A `Simulation` contains a `Kinetics` and a `ForceProtocol`.">
192
192
</p>
193
193
194
194
@@ -244,7 +244,7 @@ for mySimulation in 0..<120 {
244
244
245
245
```
246
246
247
-
See [Example](https://github.com/swiftgraphs/Grape/tree/main/Examples/ForceDirectedGraphExample) for more details.
247
+
See [Example](https://github.com/li3zhen1/Grape/tree/main/Examples/ForceDirectedGraphExample) for more details.
248
248
249
249
</details>
250
250
@@ -284,7 +284,7 @@ See [Example](https://github.com/swiftgraphs/Grape/tree/main/Examples/ForceDirec
284
284
285
285
#### Simulation
286
286
287
-
Grape uses simd to calculate position and velocity. Currently it takes **~0.005** seconds to iterate 120 times over the example graph(2D). (77 vertices, 254 edges, with manybody, center, collide and link forces. Release build on a M1 Max, [tested](https://github.com/swiftgraphs/Grape/blob/main/Tests/ForceSimulationTests/MiserableGraphTest.swift) with command `swift test -c release`)
287
+
Grape uses simd to calculate position and velocity. Currently it takes **~0.005** seconds to iterate 120 times over the example graph(2D). (77 vertices, 254 edges, with manybody, center, collide and link forces. Release build on a M1 Max, [tested](https://github.com/li3zhen1/Grape/blob/main/Tests/ForceSimulationTests/MiserableGraphTest.swift) with command `swift test -c release`)
288
288
289
289
For 3D simulation, it takes **~0.008** seconds for the same graph and same configs.
290
290
@@ -294,7 +294,7 @@ For 3D simulation, it takes **~0.008** seconds for the same graph and same confi
294
294
<br/>
295
295
296
296
#### KDTree
297
-
The `BufferedKDTree` from this package is **~22x** faster than `GKQuadtree` from Apple’s GameKit, according to this [test case](https://github.com/swiftgraphs/Grape/blob/main/Tests/ForceSimulationTests/GKTreeCompareTest.swift). However, please note that comparing Swift structs with NSObjects is unfair, and their behaviors are different.
297
+
The `BufferedKDTree` from this package is **~22x** faster than `GKQuadtree` from Apple’s GameKit, according to this [test case](https://github.com/li3zhen1/Grape/blob/main/Tests/ForceSimulationTests/GKTreeCompareTest.swift). However, please note that comparing Swift structs with NSObjects is unfair, and their behaviors are different.
Copy file name to clipboardExpand all lines: Sources/ForceSimulation/ForceSimulation.docc/CreatingASimulationWithBuiltinForces.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -67,4 +67,4 @@ A diagram showing the relationships of `Kinetics`, `ForceProtocol` and `Simulati
67
67
68
68
In this example, we run our simulation in a 2D space (`SIMD2<Double>`). We explicitly create a ``SealedForce2D`` to make sure the force is in the same dimension as the Kinetics. The `Vector` in `Simulation` is inferred from the force we pass.
69
69
70
-
See [Examples](https://github.com/swiftgraphs/Grape/tree/main/Examples) for example Xcode projects.
70
+
See [Examples](https://github.com/li3zhen1/Grape/tree/main/Examples) for example Xcode projects.
Copy file name to clipboardExpand all lines: Sources/ForceSimulation/ForceSimulation.docc/Documentation.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Run force simulation within any number of dimensions.
6
6
7
7
The `ForceSimulation` library enables you to create any dimensional simulation that uses velocity Verlet integration.
8
8
9
-
If you’re looking for an out-of-the-box SwiftUI View to render force-directed graphs, please refer to [Grape | Documentation](https://swiftgraphs.github.io/Grape/Grape/documentation/grape/).
9
+
If you’re looking for an out-of-the-box SwiftUI View to render force-directed graphs, please refer to [Grape | Documentation](https://li3zhen1.github.io/Grape/Grape/documentation/grape/).
0 commit comments