Developer Paweł Głowacki from Embarcadero has translated an open source raytracing engine from C++ into Object Pascal for Delphi XE7 Firemonkey. The original raytracer is by Caleb Piercy who has 9 YouTube videos which guide you through the entire process of writing the raytrace engine in C++. Paweł translated the code from the guide into Object Pascal with support for both the VCL and FMX frameworks. The FMX version runs on Android, IOS, OSX, and Windows. The FMX code has some pretty good examples in there like directly writing colors to pixels using TMapAccess and TBitmapData.SetPixel(). The core of the raytracer is shared and usable by both the VCL and FMX frameworks. The entire raytracer comes in at only a few thousand lines of code. You can check out the original source code in C++ on SourceForge. This code should also compile in Appmethod.
Simple Raytracing Engine Source Code For Delphi XE7 Firemonkey On Android And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.