u-anurag / OpenSeesPy

OpenSeesPy-Visualization: This branch is to work on Plotting commands to Python-based visualization of OpenSees models.
https://openseespydoc.readthedocs.io/en/latest/src/Plotting_Development_Guide.html
5 stars 2 forks source link

Speedup rendering of 3D brick elements #79

Open u-anurag opened 4 years ago

u-anurag commented 4 years ago

Check for repeated plotted surfaces.

cslotboom commented 4 years ago

Something that might help here is the opacity of elements. As a test it might be worth making the elements fully opaque to see if that speeds things up at all.

u-anurag commented 4 years ago

I have tried some things. Printing node and element tags slows things down. In this particular case, opacity does not make much difference in the rendering speed. I am working on this and will soon try the revised code.

cslotboom commented 4 years ago

Okay, good to know.

I did some testing awhile ago on performance. Something that made a big difference was cutting out the for loop.

For example:

plt.plot(*lines)

instead of:

for line in lines:
    plt.plot(line)

Can be much faster. However, it can be difficult to formulate the code to do this. It works decently for lines, but other objects might be trickier.