package ephemeral
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Visualize spacecraft trajectories
Install
dune-project
Dependency
Authors
Maintainers
Sources
ephemeral-1.0.tbz
sha256=ebbc12fcd4a61d026e32cd725920a7d15a05c07149870fc2aaf0b7faf55320d9
sha512=e3b17f041a8cb0be9a2656810a672df5fc7584e22b56355400ea11651da71d4a5f63e8eecf066e6b3931c451385eb0690249d82ab0c552de708265438117f70b
doc/src/ephemeral.renderer/settings.ml.html
Source file settings.ml
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(** Global settings for the renderer *) open Ephemeral.Vector_table open Graphics (** Body shapes *) type shape = Circle | Square | Triangle | Point | Cross | H (** Screen-space body *) type body = { shape: shape (** What shape the body will show as *) ; filled: bool (** Whether the shape will be filled *) ; size: int (** Radius, side length, side length, N/A, width depending on [shape] *) ; color: color (** Color of body *) ; table: vtable option (** Corresponding vector table *) } (** System's reference body *) let reference_body = ref {shape= Circle; filled= false; size= 20; color= blue; table= None} (** Target bodies in system *) let targets : body list ref = ref [] (** Bounds on the plane in terms of system coordinates *) let min_x, max_x, min_y, max_y = (ref 0., ref 0., ref 0., ref 0.) (** Frame advancement speeds *) type speed = | Slow of int (** Advance 1 entry every n frames *) | Fast of int (** Advance n entries every frame *) (** Pre-selected speeds *) let speeds = [| Slow 16 ; Slow 8 ; Slow 4 ; Slow 2 ; Fast 1 ; Fast 2 ; Fast 5 ; Fast 10 ; Fast 25 ; Fast 50 |] let find_index (f : 'a -> bool) (arr : 'a array) : int option = fst (Array.fold_right (fun i (found, idx) -> ( ( match found with | Some _ -> found | None -> if f i then Some idx else None ) , idx + 1 ) ) arr (None, 0) ) (** Index of initial speed setting *) let default_speed_idx = ref ( match find_index (( = ) (Fast 1)) speeds with | None -> [%unreachable] | Some idx -> idx ) (** Title text to be drawn at the top of the screen *) let title_text : string option ref = ref None (** Whether to use per-frame dynamic scaling *) let dynamic_scale = ref false (** Azimuth *) let view_theta = ref 0. (** Elevation *) let view_phi = ref 0.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>