From 3c53262f122e52479e4917c6a13f2c8f03132050 Mon Sep 17 00:00:00 2001 From: WassCodeur Date: Tue, 30 Jul 2024 14:14:30 +0000 Subject: [PATCH] DOCS: Update variable descriptions in visualization examples --- docs/examples/viz_animated_surfaces.py | 12 +++++---- docs/examples/viz_bezier_interpolator.py | 23 ++++++++++------- docs/examples/viz_billboard_sdf_spheres.py | 2 +- docs/examples/viz_emwave_animation.py | 30 ++++++++++++++-------- 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/docs/examples/viz_animated_surfaces.py b/docs/examples/viz_animated_surfaces.py index da166421c..9dfaa56c4 100644 --- a/docs/examples/viz_animated_surfaces.py +++ b/docs/examples/viz_animated_surfaces.py @@ -40,13 +40,15 @@ def update_surface(x, y, equation, cmap_name="viridis"): ############################################################################### # Variables and their usage: -# :time - float: initial value of the time variable i.e. value of the time variable at -# the beginning of the program; (default = 0) +# +# time: float +# initial value of the time variable i.e. value of the time variable at +# the beginning of the program; (default = 0) # dt: float -# amount by which ``time`` variable is incremented for every iteration -# of timer_callback function (default = 0.1) +# amount by which ``time`` variable is incremented for every iteration +# of timer_callback function (default = 0.1) # lower_xbound: float -# lower bound of the x values in which the function is plotted +# lower bound of the x values in which the function is plotted # (default = -1) # upper_xbound: float # Upper bound of the x values in which the function is plotted diff --git a/docs/examples/viz_bezier_interpolator.py b/docs/examples/viz_bezier_interpolator.py index 1e833b4c2..4f31a55ec 100644 --- a/docs/examples/viz_bezier_interpolator.py +++ b/docs/examples/viz_bezier_interpolator.py @@ -31,19 +31,22 @@ # ============================= # In order to make a cubic bezier curve based animation, you need four values # for every keyframe: +# # 1- Timestamp: The time that the keyframe is assigned to. -# 2- value: The value of the keyframe. This might be position, quaternion, or -# scale value. -# 3- In control point: The control point used when the value is the destination -# value. +# +# 2- Value: The value of the keyframe. This might be position, quaternion, or scale +# value. +# +# 3- In control point: The control point used when the value is the destination value. +# # 4- Out control point: The control point used when the value is the departure -# value:: +# value:: # -# keyframe 0 -----------------> keyframe 1 -# (time-0) (value-0) (out-cp-0) -----------------> (time-1) (value-1) (in-cp-1) +# keyframe 0 -----------------> keyframe 1 +# (time-0) (value-0) (out-cp-0) -----------------> (time-1) (value-1) (in-cp-1) +# keyframe 1 -----------------> keyframe 2 +# (time-1) (value-1) (out-cp-1) -----------------> (time-2) (value-2) (in-cp-2) # -# keyframe 1 -----------------> keyframe 2 -# (time-1) (value-1) (out-cp-1) -----------------> (time-2) (value-2) (in-cp-2) keyframe_1 = {"value": [-2, 0, 0], "out_cp": [-15, 6, 0]} keyframe_2 = {"value": [18, 0, 0], "in_cp": [27, 18, 0]} @@ -79,10 +82,12 @@ # # Cubic Bezier keyframes consists of 4 data per keyframe # Timestamp, position, in control point, and out control point. +# # - In control point is the cubic bezier control point for the associated # position when this position is the destination position. # - Out control point is the cubic bezier control point for the associated # position when this position is the origin position or departing position. +# # Note: If a control point is not provided or set `None`, this control point # will be the same as the position itself. diff --git a/docs/examples/viz_billboard_sdf_spheres.py b/docs/examples/viz_billboard_sdf_spheres.py index e9c61e41c..11e9c84f4 100644 --- a/docs/examples/viz_billboard_sdf_spheres.py +++ b/docs/examples/viz_billboard_sdf_spheres.py @@ -286,7 +286,7 @@ ############################################################################### # References # ---------- -# .. [Hart1996] Hart, John C. "Sphere tracing: A geometric method for the +# .. _[Hart1996] Hart, John C. "Sphere tracing: A geometric method for the # antialiased ray tracing of implicit surfaces." The Visual # Computer 12.10 (1996): 527-545. # diff --git a/docs/examples/viz_emwave_animation.py b/docs/examples/viz_emwave_animation.py index 163e0d8d2..f50632a33 100644 --- a/docs/examples/viz_emwave_animation.py +++ b/docs/examples/viz_emwave_animation.py @@ -34,17 +34,25 @@ def update_coordinates(wavenumber, ang_frq, time, phase_angle): ############################################################################### -# Variable(s) and their description- -# npoints: For high quality rendering, keep the number of npoints high -# but kindly note that higher values for npoints will slow down the -# rendering process (default = 800) -# wavelength : wavelength of the wave (default = 2) -# wavenumber : 2*pi/wavelength -# time: time (default time i.e. time at beginning of the animation = 0) -# incre_time: value by which time is incremented for each call of -# timer_callback (default = 0.1) -# angular_frq: angular frequency (default = 0.1) -# phase_angle: phase angle (default = 0.002) +# Variable(s) and their description +# +# npoints: int +# For high quality rendering, keep the number of npoints high +# but kindly note that higher values for npoints will slow down the +# rendering process (default = 800) +# wavelength: int +# wavelength of the wave (default = 2) +# wavenumber: float +# 2*pi/wavelength +# time: float +# time (default time i.e. time at beginning of the animation = 0) +# incre_time: float +# value by which time is incremented for each call of +# timer_callback (default = 0.1) +# angular_frq: float +# angular frequency (default = 0.1) +# phase_angle: float +# phase angle (default = 0.002) npoints = 800