-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathNOTES.txt
More file actions
102 lines (89 loc) · 3.02 KB
/
NOTES.txt
File metadata and controls
102 lines (89 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Property groups (in properties.py):
sssim_scn (type: SSSIMScene)
- sim_time
- time_exp
- length_exp
- planet_size_mult
- draw_orbit
sssim_obj (type: SSSIMObject)
- use sssim
- object_type
- show_info
- center
# not used for surfaces:
- mass_mantissa
- mass_exp
sssim_orbit (type: SSSIMOrbit)
- eccentricity
- distance_mantissa
- distance_exp
- inclination
- asc_node
- arg_periapsis
- time_offset
- use_user_period
- use_frames
- user_period_seconds
- user_period_frames
sssim_rotation (type: SSSIMRotation)
- use_rotation
- use_frames
- user_period_frames
- user_period_seconds
- axis_tilt
- axis_direction
- relative_to_orbit
sssim_calc (type: SSSIMCalculation)
- use_driver
- cyclic
- frame_start
- frame_end
- frame_step
(- motion_path <- not useful)
sssim_surface (type: SSSIMSurface)
- calc_radius
# used internally:
(- object_proportions)
(- original_scale)
- radius_mantissa
- radius_exp
TODO:
- 3D-Viewport panel in "Tools" or "SSSim" category?
- Add drivers and simulation time F-Curve automatically via bpy.app.handlers.load_post?
- Help text: activate for every panel with (?) in upper corner
- Add option for "advanced settings"?
- Switch order of "Ascending Node" and "Argument of Periapsis" (research the usual convention)
- See https://danielk.developer.irf.se/pyorb/ for more features:
- Implement parabolic and hyperbolic trajectories (use EnumProperty for type "circular", "elliptical", "parabolic", "hyperbolic"?)
- Add toggle (EnumProperty) for alternative input: specify periapsis (and eccentricity) instead of semi-major axis (and eccentricity), works better for e >= 1 orbits
- Input cartesian coordinates, i.e. specify (x, y, z, vx, vy, vz, t0), but convert to kepler elements
- Increase resolution of orbit path curve? Use Bezier circle with more than 4 nodes?
- "Bake" the simulation for dynamically changing orbit (e.g. when keyframing orbit properties):
```
import bpy
scn = bpy.context.scene
obj = bpy.context.object
# Frame range to bake
frame_start = scn.frame_start - 1
frame_end = scn.frame_end + 1
frame_step = 10 # number of frames to skip forward
# Compute locations via driver and save them
stash = dict() # mapping {frame: location vector}
f = frame_start
while f <= frame_end:
scn.frame_set(f)
stash[f] = obj.location.copy()
f += frame_step
# Then remove the driver
obj.driver_remove("location")
# Now create the location keyframes
for f, loc in stash.items():
obj.location = loc
obj.keyframe_insert(data_path="location", frame=f)
```
Finally, in the Graph Editor set the fcurve extrapolation mode to linear (Channel > Extrapolation Mode > Linear Extrapolation) to get the correct animation at the start and end of the scene.
LINKS:
http://www-spof.gsfc.nasa.gov/stargaze/Smap.htm
http://www-spof.gsfc.nasa.gov/stargaze/Skeplaws.htm
http://en.wikipedia.org/wiki/Orbital_elements
https://orbital-mechanics.space/intro.html