MurrellGroup / ProtPlot.jl

Protein ribbon plots implemented in Julia using Makie
MIT License
13 stars 1 forks source link

Arrow heads freaking out occasionally #8

Closed AntonOresten closed 10 months ago

AntonOresten commented 10 months ago

Computing tangents/normals/binormals of the arrow surface is currently a little bit of a shitshow, which leads to issues like the one below.

image

I suspect it has to do with the spline (created from oxygen atoms) extending beyond the endpoint.

AntonOresten commented 10 months ago

This issue is getting fixed in v0.2.0 by removing the next to last control point (oxygen atom) of the two splines that form the surface and normals of a strand.

I also made it so that the angle between the arrow body and head is always 90 degrees -- it could look kinda funky when the spline quality was low.

This: image

turned into this: (no wonky tips) image

which in turn turned into this: (perpendicular edges) image

As a result, the colors are also much more consistent.