Code Monkey home page Code Monkey logo

minirt's Introduction

Hi there 👋

minirt's People

Contributors

eringishimeji avatar harsssh avatar

Stargazers

 avatar

Watchers

 avatar

minirt's Issues

円錐が正しく表示されない

横に広いと一部が透ける

A 0.2 255,255,255
C 0,100,100 0,-0.707,-0.707 30
L 200,200,200 0.8 255,255,255
co 0,10,0 0,-1,0 20 10 180,20,30
pl 0,0,0 0,1,0 255,255,255
スクリーンショット 2024-01-05 12 06 34

課題要件

  1. Mandatory Part:

    • Generate images using Raytracing protocol.
    • Handle geometric objects like planes, spheres, and cylinders.
    • Implement basic light management with spot brightness and ambient lighting.
    • Display images in a window with specific user interaction rules (e.g., pressing ESC to quit).
    • Read scene descriptions from .rt files.
  2. Bonus Part:

    • Advanced features like specular reflection, color disruption (checkerboard), multi-spot lights, additional geometric objects (e.g., cone, hyperboloid), and bump map textures.

チェッカー柄

オブジェクトに2つ目の色を指定して, チェッカー柄にできる.

miniRT/include/scene.h

Lines 101 to 110 in 2e90178

typedef struct s_material
{
double diffuse_reflectance;
double specular_reflectance;
double ambient_reflectance;
double shininess;
bool checker;
t_rgb check_color;
const char *height_map;
} t_material;

Bump Mapping

Height Mapのパスはパース済み. レイとの交点での法線 (normal) をいい感じに決めればできる?

miniRT/include/scene.h

Lines 101 to 110 in f4aa773

typedef struct s_material
{
double diffuse_reflectance;
double specular_reflectance;
double ambient_reflectance;
double shininess;
bool checker;
t_rgb check_color;
const char *height_map;
} t_material;

miniRT/include/tracer.h

Lines 24 to 31 in f4aa773

typedef struct s_hit_record
{
double t;
t_vec3 point;
t_vec3 normal;
t_material material;
t_rgb object_color;
} t_hit_record;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.