Open rn123 opened 4 years ago
Sigh, lost the python code to generate the (animated) svg. The one generated file that I still have does have pretty good structure to show the logic. The python code
Basic requirements:
inkscape:label="ecliptic" inkscape:groupmode="layer"
attributes in the svg groups.Back plate
Rete
Currently, Astrolabe object computes the basic elements (centers and radii) and fills in a jinja2 template for the svg output. Started using svgpathtools
to compute intersections of paths. Also, cairosvg
is used to generate a png output. The cairosvg
package also provides access to an xml parse tree object.
with open('ecliptic_division.svg') as fp: tree = cairosvg.parser.Tree(file_obj=fp) for elem in tree.xml_tree: print(elem)
A more expressive representation would be a minimal svg boilerplate, parsed into an xml_tree and svgpathtools
path representations that can be mixed and matched to generate a custom astrolabe output.
Currently, Astrolabe object computes the basic elements (centers and radii) and fills in a jinja2 template for the svg output. @rn123 Note: Should compare liquid vs jinja2 templates. Also, what templates are used in DASH?
Especially for the time of a new moon, generate astrolabe diagram for the location (default TBD).