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
Hi,
thanks for your programs. They are fun and interesting.
I noted some small problems:
a_bit_mondrian.py
Running it in python 3 gives an error in the random.choice function because colors is an iterable and not a list.
By changing line 14 to:
colors = list(color_nums.keys())
the problem is resolved.
double_pendulum.py
1- the PATH directive is not terminated properly which gives an XML error.
to correct simply change line 116 from:
path+= '" style="fill-opacity: 0; stroke-width: 2; stroke: green; filter: url(#glow);"'
to
path+= '" style="fill-opacity: 0; stroke-width: 2; stroke: green; filter: url(#glow);" />'
2- the filter is not applied because the tags in the filter definition are in lowercase instead of camelcase:
fegaussianblur must be change to feGaussianBlur
stddeviation to stdDeviation
femerge to feMerge
femergenode to feMergeNode
Funny thing, the lowercase tags works in a Jupyter notebook.
Speaking of Jupyter notebook, I put all your programs in a single Jupyter notebook to facilitate experimentation.
I included the notebook and a sample pdf file in the attached files.
Hi,
thanks for your programs. They are fun and interesting.
I noted some small problems:
a_bit_mondrian.py
Running it in python 3 gives an error in the random.choice function because colors is an iterable and not a list.
By changing line 14 to:
colors = list(color_nums.keys())
the problem is resolved.
double_pendulum.py
1- the PATH directive is not terminated properly which gives an XML error.
to correct simply change line 116 from:
path+= '" style="fill-opacity: 0; stroke-width: 2; stroke: green; filter: url(#glow);"'
to
path+= '" style="fill-opacity: 0; stroke-width: 2; stroke: green; filter: url(#glow);" />'
2- the filter is not applied because the tags in the filter definition are in lowercase instead of camelcase:
fegaussianblur must be change to feGaussianBlur
stddeviation to stdDeviation
femerge to feMerge
femergenode to feMergeNode
Funny thing, the lowercase tags works in a Jupyter notebook.
Speaking of Jupyter notebook, I put all your programs in a single Jupyter notebook to facilitate experimentation.
I included the notebook and a sample pdf file in the attached files.
sample.pdf
svg_play_notebook.zip
The text was updated successfully, but these errors were encountered: