andros21 / rustracer Goto Github PK
View Code? Open in Web Editor NEWrustracer - a multi-threaded raytracer in pure rust
Home Page: https://andros21.github.io/rustracer/docs
License: GNU General Public License v3.0
rustracer - a multi-threaded raytracer in pure rust
Home Page: https://andros21.github.io/rustracer/docs
License: GNU General Public License v3.0
images rendered always seems too dark without manually adjust --factor 1.0
how about change its default value in src/cli
?
Lines 83 to 95 in a851061
In this double nested for
cycle, it's maybe better to reverse the logic ... not repeat match
width*height
times, but match
before loop and create a nested for
each branch of the match
. Something like this:
match endianess {
condition1 => { double for loop }
condition2 => { double for loop }
}
inside demo
feature branch is now visible a problem when a scene is rendered ...
shapes placed along y-axis are flipped upside-down, ๐ at that:
for how scene is built in demo
subcommand insidemain.rs
Lines 104 to 119 in cb35aef
the big circle in the upside middle part of the image should stay at the bottom!
Probably there is problem inside already merged imagetracer
module
PR is coming
$ rustracer render -f 0.5 examples/demo.yml demo.png
$ rustracer render --angle-deg 90 -f 0.5 examples/demo.yml demo.png
This is wrong! It's an unexpected behaviour, because z-axis rotation is applied before the translation (see examples/demo.yml
)
Lines 103 to 105 in 71a9531
instead the logic should be reversed, before translation and then rotation added via cli, the problem is transformation product order:
Lines 1190 to 1195 in 71a9531
and it's not the only occurrences of that type cause also when composing multiple transformation, the product must be reversed:
Line 968 in 71a9531
Lines 992 to 993 in 71a9531
so that the expected output of precedent command will be:
in the method new
of PerspectiveCamera
the argument aspect_ratio
and distance
are exchanged respect how are used inside test
Lines 103 to 114 in 66115ce
this kind of errors are not caught in unit tests cause objects are created directly (using the power of super::*
) ...
this teach us to always use new
method also inside unit test or at least alternate with the direct creation
(unrelated this workflow probably will improve also unit test coverage)
PR is coming
#derive
macro of each classnew
instead direct object initializationSelf
is correct to be used?UnableToNormalize
is used only inside tests, we can delete itonoffrender.solve
is possible? And for ray_intersaction
in world
?::from
tuple for Vector2D
in misc.rs
could be useful to lighten syntax, no?Vector2D::isclose
Vector2D::from((f32, f32))
is heavier syntax than Vector2D{u: f32, v: f32,}
cli
(complete+manpage) using clap related projectsrustfmt.toml
(alacritty for some ideas ๐ก)rustfmt
... we'll seemain
function in inside main.rs
imagetracer.rs
ci-cd
branch already open, cd.yml
missingflamegraph
heap_allocator
? dev dependencies?error.rs
so that source error are printed at new line#[no_coverage]
will be stable, bypass coverage test for main.rs
, cli.rs
, etc ...other improvements're welcome!
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.