64 / cmake-raytracer Goto Github PK
View Code? Open in Web Editor NEWRay tracer written in pure CMake
License: MIT License
Ray tracer written in pure CMake
License: MIT License
As per the README:
For now, to keep the code simple, you are required to keep image_width, image_height and num_procs as powers of 2, otherwise the image may not be fully formed.
This shouldn't be too hard to fix.
The sample image has some artifacts: for example, the part of the "floor" which is the nearest to the camera appears convex.
I am not sure how would you like to format this or if you would even want to include it at all hence an issue and not a pr.
1, 2, 4, 8, 16, 32, 64, 128, 256, 512 | foreach {Write-Host $_; (Measure-Command { cmake . "-Dimage_width=$_" "-Dimage_height=$_" "-Dnum_procs=$Env:NUMBER_OF_PROCESSORS" 2> image_size_$_.ppm }).TotalSeconds }
config: i7-10700
8C/16T with cmake 3.21.0-rc2
run for 16 threads .
output:
1
3.3046483
2
3.2815196
4
3.381609
8
1.8510678
16
1.9677127
32
1.8989169
64
3.2966402
128
12.1628932
256
47.9041449
512
184.0473142
While I was reading the code, I noticed this in line 248, in to_fp()
:
string(SUBSTRING ${frac_part} 0 6 frac_part)
Why 6
? What does it stand for? Rounding? But why round a number to 6 decimal points here? I just can't make sense of it.
You do not have a shadow in the reflection on the sphere, the shadow on the tile from the sphere. )))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.