Giter Site home page Giter Site logo

42-minirt's Introduction

42-miniRT

My first RayTracer with miniLibX

42-minirt's People

Contributors

sgkhusal avatar eliarisalvares avatar

Stargazers

 avatar Marcos Flávio avatar Eduardo Tachotte avatar Paula Hemsi avatar Rodrigo Alves  Brito avatar  avatar Ghislain MITAHI avatar

Watchers

 avatar

Forkers

eliarisalvares

42-minirt's Issues

Window management

  • open mlx window
  • create a mlx image
  • create mlx hooks
  • Pressing ESC must close the window and quit the program cleanly
  • Clicking on the red cross on the window’s frame must close the window and quit the program cleanly
  • The management of your window must remain smooth: changing to another window, minimizing, etc

Chapter 2 - Drawing on a Canvas

Implement functions from the chapter:

  • criar uma estrutura de cor em forma de vetor, de forma que possamos usar as mesmas operações de vetores - o w pode ficar como zero?
    - [x] addition
    - [ ] subtraction
    - [x] multiplication by scalar
  • multiply a color by another color
  • create a canvas - mlx image ? ou uma matriz com canvas size x pixels (3) - para saber se tem algum item fica na frente de outro?
  • arquivo de imagem - é a mlx_image plotada na janela
  • write_pixel - put_pixel_to_image?

Chapter 3 - Matrices

Create functions from chapter 3:

  • criação de matrizes quadradas (n = 2, 3, 4) - malloc - como preencher vai ter que ser colocado no nosso próprio código, não dá para colocar como input de uma função
  • matrix comparison (doubles)
  • multiplying matrices (4x4)
  • multiplying a matrix by a tuple
  • identity matrix
  • multiplying a matrix by the identity matrix
  • transposing matrices
  • determinant 2 x 2
  • submatrix
  • determinant 3 x 3 and 4 x 4 (função recursiva)
  • check if a matrix has an inverse
  • matrix inverse

Check input

  • argc == 2
  • valid file - *.rt, valid permission, file exists
  • empty file
  • valid element: A, C, L, sp, pl, cy
  • A, C, and L only declared once
  • se não tiver a Camera - vai ser um arquivo inválido?
  • como vamos lidar se não tiver A e L?
  • como vamos lidar se não tiver nenhum elemento na cena (esfera, plano ou cilindro)?
  • A order and valid numbers
  • C order and valid numbers
  • L order and valid numbers
  • sp order and valid numbers
  • pl order and valid numbers
  • cy order and valid numbers
  • some scenes for tests (invalid and valid inputs)

◦ Each type of element can be separated by one or more line break(s).
◦ Each type of information from an element can be separated by one or more space(s).
◦ Each type of element can be set in any order in the file.
◦ Each element first’s information is the type identifier (composed by one or two character(s)), followed by all specific information for each object in a strict order
• If any misconfiguration of any kind is encountered in the file the program must exit
properly and return "Error\n" followed by an explicit error message of your choice.

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.