phetsims / gene-expression-essentials

An educational simulation about how genes work to create proteins.
GNU General Public License v3.0
4 stars 6 forks source link

Improve rendering of mRNA #65

Closed ariel-phet closed 6 years ago

ariel-phet commented 7 years ago

After discussing with @jbphet and playing around on an iPad2, it sounds like the main bottleneck to performance is rendering the mRNA which turns out to be a computationally expensive set of Bezier curves.

@phet-steele should work with @aadish and @jbphet to come up with an easier to render but still acceptable representation (my personal opinion is that it needs to merely be reasonably recognizable in the "icon" sense, and palatable to biology teachers, not a perfect representation).

Once this performance bottleneck has been improved we will move to a full round of dev testing.

jbphet commented 6 years ago

Note to self: Keep #81 in mind when working on this. It may be possible to override the bounds method and/or turn off pickability of the strand and have an overlay node so that Scenery doesn't have to be evaluating a complex shape for pointer hits.

jbphet commented 6 years ago

I've create a winding algorithm for the mRNA that uses sine functions to construct the mRNA shape. I published a version that does a different variation of this algorithm every time a strand of mRNA is produced so that I could demonstrate it to people with more expertise than I have and choose which variants to use. This version is published here: http://www.colorado.edu/physics/phet/dev/html/gene-expression-essentials/1.0.0-dev.11/gene-expression-essentials_en.html.

jbphet commented 6 years ago

@phet-steele sent a link to some electron micrographs of mRNA, and I thought this one might be a good reference as to what to work towards visually:

mrna

jbphet commented 6 years ago

I've done a lot of work on this, and I've published a version where @kathy-phet may be able to get some feedback from someone with a lot of knowledge in this area. I'll unassign and lower the priority until I either hear something back.

jbphet commented 6 years ago

@kathy-phet's connection chose the shape of the molecule from the first gene on the "Expression" screen (screen 1), and recommended that we use that shape for all three genes and just lengthen it to match up with the length of the gene. I'm moving forward with that approach.

jbphet commented 6 years ago

Forgot to reference this issue in commit fdc83f5f1cc3fc49f5ea1b0e534f6ffa91f1cc77.

phet-steele commented 6 years ago

I like it, but has this been cleared by @kathy-phet's contact?

jbphet commented 6 years ago

This has been approved by @kathy-phet's contact. Closing.