0

Excel Ray Tracing With Help From C

 2 years ago
source link: https://hackaday.com/2021/09/28/excel-ray-tracing-with-help-from-c/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Excel Ray Tracing With Help From C

It isn’t news that [s0lly] likes to do ray tracing using Microsoft Excel. However, he recently updated his set up to use functions in a C XLL — a DLL, really — to accelerate the Excel rendering. Even if ray tracing isn’t your thing, the technique of creating custom high-performance Excel functions might do you some good somewhere else.

We’ve seen [s0lly’s] efforts before, and you can certainly see that the new technique speeds things up and produces a better result, which isn’t especially surprising. In addition to being faster, the new routines produce more detail.

The Microsoft documentation on doing this is pretty clear if you want to give it a go. One of the things you can do in your C code is to take advantage of things like threads to get better performance, which [s0lly] shows in his example.

Of course, you could argue that you don’t need Excel here, but what fun would that be? Besides, then you’d need to handle all the data input and output which would be a pain in its own right.

If you need a simple explanation of ray tracing, we just covered that. We aren’t above abusing spreadsheets, ourselves.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK