Why Python Matters for our Vizard VR Software

May 10, 2021

Andy Beall, Chief Scientist, WorldViz

Easy to learn and read, and with a huge scientific community behind it, Python has been at the heart of the Vizard VR software from the start. Read WorldViz Chief Scientist Andy Beall’s perspective on why novices and experts alike enjoy Python more than ever.

Believe it or not, Python was first released 30 years ago and for nearly that long we've made it the cornerstone of our Vizard virtual reality (VR) development platform. You may also be surprised to know that VR has been around for nearly twice that long! How we came to choose Python so long ago is a story in itself, but what is remarkable is that even after so many years Python has only continued to become more and more valuable to us and our customers. 

End of last year, we upgraded Vizard 7 to the latest version of Python, giving our customers access to an even wider range of Python community libraries.

Three reasons capture why Python is so great for scientists:

1) Python is easy to learn 

We think this is the most important reason why Python is a great choice for scientific research. We've seen hundreds of researchers with no Python experience gain fluency in a matter of one or two months and successfully build virtual reality experiments. For our customers, the world of 3D graphics and real-time virtual reality environments is suddenly cracked up and ready to be used for research. It gets even more exciting when our customers see how easy Python makes it to collect data from the sensors, save it to files, and then use Python libraries like numpy and matplotlib to add a data analysis and visualization pipeline. 

2) Python is easy to read 

Unless you've worked with collections of code before this point may not fully resonate but trust us when we say this is critical. We've heard countless claims by customers who say they are relieved to now feel that they can read, understand, and even tweak projects built by others in the lab. Alex Martelli, a Fellow at the Python Software Foundation writes that "To describe something as 'clever' is not considered a compliment in the Python culture. Clever programming is often unreadable by anyone except an expert. Python is meant to be easily readable and immediately useful.

3) Python has a huge scientific community 

It's no joke when we say you can almost always find a useful library by googling "python" plus your target keyword. There are simply tons of libraries available for scientific research, nearly all open-source and freely shared amongst an amazing community. Scientists across all domains have adopted Python as one of the favorite analysis tools so you'll find tons of researchers actively developing useful projects. Try a similar search in other languages and you'll see a huge difference. Further, compare how much less effort it takes to incorporate external libraries into Python compared to other languages and you'll be amazed. 

What about the performance penalty for using Python? We get this question sometimes and it's usually a red herring. Sure, Python and C compiled code are in different categories and if you pick the right computing problem, you can show C/C++ to be much faster at number crunching. However, time to crunch numbers isn't what most of our users care about. GPUs and CPUs are so fast today that it's rare that Python's compute speed is an issue. Not rare, though, is how often projects can be completed faster in Python. Identify what matters most to you and measure speed accordingly.  

For our customers, Python plays a central role in their daily experience with our product. One of the core values we provide is wrapping up all the complexity of a sophisticated 3D render engine capable of low-level graphics control needed by researchers all into a friendly Python interface. The fact that Python was purposely designed to be an enjoyable language shows how quickly novice programmers across the board can begin coding projects of their own. Unlike Java and C++, Python is inherently obvious in how to do things, and that single characteristic has led our customers to feel self-empowered and confident enough to explore projects and make discoveries that they would otherwise have felt was beyond their programming expertise. 

For us, Python has shaped our product development lifecycle, and we firmly believe it’s the world’s most accessible and powerful scripting language. You can't help but embrace the rapid application development paradigm, which has enabled us to overcome challenges such as quickly building hardware drivers for a rapidly evolving industry. We cater to a scientifically inclined customer base, and Python's rich community with shared libraries provides ready-built functionality that is beyond compare. As it said by others, we build in Python whenever we can and only use C++ when we must. 

In conclusion, whether you're developing code to immerse a person in a tightly controlled virtual world to study their reactions to stimuli, or you're using machine learning to model the spread of COVID-19, you owe it to yourself to try Python. You won't regret it. 

For an in-depth look at Vizard 7’s new features - including the upgrade to Python 3.8 - please check out this Vizard 7 webinar video.

For Vizard How To’s and tutorials, here is a Vizard tutorial playlist to get you started, beginning with how to connect a Vive VR headset to Vizard.

Are you new to creating experiments using Python? Here is a quick tutorial on how to create a VR experiment using Python 3.8 with Vizard.

If you are interested in learning more about Vizard and how you might use it for your scientific virtual reality research, please contact us at sales@worldviz.com

Stay Updated
Subscribe to our monthly Newsletter
Phone +1 (888) 841-3416
Fax +1 (866) 226-7529
813 Reddick St
Santa Barbara, CA 93103