All Projects → phresnel → Metatrace

phresnel / Metatrace

Projects that are alternatives of or similar to Metatrace

Psraytracing
A (modern) C++ implementation of the first two books of the Peter Shirley Ray Tracing mini-books (https://raytracing.github.io). Features a clean project structure, perf. improvements (compared to the original code), multi-core rendering, and more.
Stars: ✭ 129 (+92.54%)
Mutual labels:  computer-graphics, ray-tracing
Photon-v2
A program that takes photographs of a virtual world.
Stars: ✭ 75 (+11.94%)
Mutual labels:  computer-graphics, ray-tracing
Sort
Simple Open-source Ray Tracer
Stars: ✭ 485 (+623.88%)
Mutual labels:  computer-graphics, ray-tracing
Node Ocr Demo
实现验证码识别,基于 node.js 配合 tesseract 和 graphicsmagick
Stars: ✭ 57 (-14.93%)
Mutual labels:  demo
Leealert
优雅的可自定义 Alert ActionSheet
Stars: ✭ 1,097 (+1537.31%)
Mutual labels:  demo
Doc Demo
Doc Demo, Show you how to write a qualified note.Now Include PHP/Javascript(注释标签范例,助你能更好理解每个注释标签的作用,目前包含了PHP/Javascript
Stars: ✭ 63 (-5.97%)
Mutual labels:  demo
Plasma
An Android Application written using latest Android Jetpack components and best practices, which displays trending movies/TV shows and cast, user can search movies and TV shows and also add them to watchlist.
Stars: ✭ 67 (+0%)
Mutual labels:  demo
Short Words
visualise lengthy words
Stars: ✭ 56 (-16.42%)
Mutual labels:  demo
Lego Expo
Play with Lego bricks anywhere using Expo
Stars: ✭ 65 (-2.99%)
Mutual labels:  demo
Yii2 Swagger Demo
The showcase for yii2-swagger
Stars: ✭ 60 (-10.45%)
Mutual labels:  demo
Redemo
react demo component
Stars: ✭ 60 (-10.45%)
Mutual labels:  demo
Moviesinsetsdemo
Movies demo app to show WindowInsets handling
Stars: ✭ 59 (-11.94%)
Mutual labels:  demo
My Animation List
My Animation List
Stars: ✭ 63 (-5.97%)
Mutual labels:  demo
Lypaymentfield
多种风格的支付框控件,可定制加密图片,也可使用带动画的弹窗。A variety of styles of payment box controls can be customized to encrypt pictures, can also be used with animated alert.
Stars: ✭ 58 (-13.43%)
Mutual labels:  demo
Pix2pix
Image-to-image translation with conditional adversarial nets
Stars: ✭ 8,765 (+12982.09%)
Mutual labels:  computer-graphics
Multi Tenant App Demo
Demonstrates the discriminator field (shared schema) based multi-tenant application using Spring Boot & Hibernate 5.
Stars: ✭ 57 (-14.93%)
Mutual labels:  demo
Noneuclidgraphics
非欧几何世界中的渲染引擎
Stars: ✭ 65 (-2.99%)
Mutual labels:  computer-graphics
Vue Transition Demo
Demo for "Creating Vue.js Transitions & Animation"
Stars: ✭ 60 (-10.45%)
Mutual labels:  demo
Test demo
Testing Using Python Demo. 使用Python测试脚本demo。
Stars: ✭ 60 (-10.45%)
Mutual labels:  demo
Spring Boot Webflux Swagger Starter
An example project to illustrate how to document Spring Boot Webflux with Swagger2
Stars: ✭ 62 (-7.46%)
Mutual labels:  demo

ORIGINAL GITORIOUS PROJECT META

Metatrace

Metatrace is a C++ compile time ray tracer ^0 (as of the initial release, it is a whitted style one).

It is mostly inane stuff. except, maybe, that it's a nice gadget to test compiler performance and conformance, especially but not exclusively in the Template and Metaprogramming corner of C++.

It requires basic C++0x support; with g++, make sure to have at least 4.4 installed.


Extern


Features

graphics viewpoint:

  • linear object list
  • recursive ray tracing (whitted style)
  • mirror reflections
  • spheres, axis aligned planes
  • quite easily extensible (considering the circumstances)
  • rgb colors
  • scalar type is fixed point
  • not fast

c++ viewpoint:

  • uses variadic templates in some contexts (e.g. scene, some math-operations)
  • fairly heavy compile time number crunching (brings back the "slow" in "ray tracing")
  • strongly typed enums, to avoid ugly enum hacks like "FORCE_DWORD=0xEFFFFFFF" and the like

bash viewpoint:

  • contains a bash script to compile on multiple cores

... more to come.


Example Rendering

an example rendering


^0: For the googles, it is also a c++ compile time raytracer and a c++ meta ray tracer (and unsurprisingly, it is even a c++ meta raytracer (and surely, a c++ template ray tracer)) :D


ORIGINAL README

  metatrace

A mostly useless (but funny) C++ Compile Time Ray Tracer.




-------------------------------------------------------------------------------
todo's for this document:
* Proper formatting
* Expand 'Scene configuration'
-------------------------------------------------------------------------------



===============================================================================
 DESCRIPTION
===============================================================================




===============================================================================
 "USAGE"
===============================================================================


-------------------------------------------------------------------------------
 Compiling (for gcc users)
-------------------------------------------------------------------------------

 0) Prerequisites
 
 If you know how to invoke g++ 4.4 or newer on your box, skip this section.
 
 Basic C++0x support is required. Make sure you have at least g++ 
 version 4.4 installed:
 
   $ g++ --version
   g++-4.4 (Debian 4.4.0-5) 4.4.0
   Copyright (C) 2009 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions.  There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   
 If you have less than 4.4, grab a newer copy from your distro or from 
 http://gcc.gnu.org.
 
 It might also be that you have 4.4 or newer installed, but it might not be the
 default. In that case (in bash), to see your options:
 
   $ g++<tab><tab>
   g++      g++-4.3  g++-4.4
   
 So instead of just "g++", type "g++-4.4".
 

 1) Option 1.
 
 Simply compile src/main.cc in C++0x mode:
 
   $ g++ -std=c++0x src/main.cc
   
 You probably get a plethora of error messages, so increase the template
 recursion limit (sidenote: the Holy Standard states that portable programs
 shall not rely on recursion depths greater than 17); a depth of 10000 was
 enough for me in all cases:
 
   $ g++ -std=c++0x  -ftemplate-depth-10000 src/main.cc
 
 If all went fine (after possibly hours and days of compiling, depending on 
 image size), you'll reap a classy "a.out". That binary consists of pure
 output, no more calculations (we did it at compile time); actually, it prints 
 a PPM file. So:
 
   $ ./a.out > result.ppm

 Open up that file in an image viewer of your choice, et voila.
 
 
 2) Option 2.
 
 g++ <= 4.4 happens to choke on larger template instantiation counts. Further,
 it does not have multithreaded compilation support at the moment. So  I have
 written a (stupid) script that invokes g++ many, many times under the hood and
 finally joins all output into a single image.
 
 Unfortunately, that script relies on ImageMagick at the moment, so make sure
 to have that installed.
 
 Assume you want to have 4 compile threads (e.g. because you have a quad core),
 then type:
 
   $ ./render.sh multi 1 4 &
   $ ./render.sh multi 2 4 &
   $ ./render.sh multi 3 4 &
   $ ./render.sh multi 4 4 &
   
 If all compiling is done,
 
   $ ./render.sh join
   
 You'll reap "supertrace/final.ppm".
 
 
-------------------------------------------------------------------------------
 Configuring image resolution
-------------------------------------------------------------------------------

 If you use ./render.sh , open it in your editor, and see
 the following fields:

  TOTAL_WIDTH=1024
  TOTAL_HEIGHT=1024
  
 As you guess, those set the size of the final result.

 If you compile src/main.cc yourself, open src/main.cc and find at the top
 the right options. You can also #define the size directly on the command line

  $ g++ -std=c++0x -ftemplate-depth-10000 \
        -DTOTAL_WIDTH=64 -DTOTAL_HEIGHT=64 \
        src/main.cc


-------------------------------------------------------------------------------
 Scene configuration
-------------------------------------------------------------------------------
 See main().



===============================================================================
 AUTHOR
===============================================================================
Written by Sebastian Mach / phresnel (*1983).



===============================================================================
 COPYING / LICENSE OF metatrace AND THIS DOCUMENT (README)
===============================================================================
Copyright (C) 2009 Sebastian Mach (*1983)
                 - [email protected]
                 - http://phresnel.org

This program is free software:  you  can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the  Free  Software
Foundation,  either  version 3 of the  License,  or  (at your option) any later
version.

This  program  is distributed in the hope that it will be useful,  but  WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  or  FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the  GNU  General Public License along  with
this program.  If not, see <http://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].