Coder Social home page Coder Social logo

solar-system's Introduction

Solar System

모든 행성들은 원궤도를 그리며, 천왕성과 해왕성 등 태양으로 부터 거리가 매우 먼 행성들은 임의적으로 그 반지름을 줄였습니다. 위성들은 구현하지 않았으며, 오직 태양계 행성들에 관해서만 작동합니다.

구현

원궤도를 구현하기 위해서 삼각함수 sincos을 사용하였습니다.
그리고 보정을 통해 한층 더 시각적으로 사용자가 감각 할 수 있게 다른 보정변수 k를 넣었습니다.

작동

공전 속도 증감과 행성 크기 조절

공전 속도의 임의적 증감과 행성의 크기 조절을 통해 행성들을 더욱 잘 볼 수 있게 되었습니다. 모든 행성들은 지구의 속성 값을 기준으로 상대적인 값들을 가집니다.

행성 정보 보기

간단히 행성에 대한 정보를 단순히 클릭을 통해서 볼 수 있게 하였습니다. 사용자의 입력을 받는데에 있어서 GLFW에 큰 도움을 받았습니다.
Space Bar를 누름과 동시에 모든 행성들의 공전이 중지됩니다. 이 상태에서 행성들의 위치를 더욱이 자세히 볼 수 있겠습니다.

프로젝트 의의

14일도 채 되지 않는 짧은 여름방학 기간동안 무엇을 하면 의미가 있을까 해서 처음에는 화학책을 폈습니다. 하지만 이것은 너무나도 량이 많아서 간간히 해서 올해 목표로 잡은지 오래였습니다. 그래서 저는 평소에도 관심있던 저의 하늘, 저의 용기, 저의 무력감 모두를 가진 바로 우리 우주에 관련해 저의 특기를 살려 만들어보기로 하였습니다.

실패점

우리 은하에 속하는 이 태양계를 구현하기 위해 처음에는 케플러 행성운동법칙에 대해 공부하였지만, 이 상태에서 공전을 구현하려면 미적분을 꼭 배워야만 한다는 사실에 절망했습니다. 물론 안될 것은 없었지만, 자신 마저 없었기 때문에 그저 원궤도를 차용하였습니다.

solar-system's People

Contributors

snowypainter avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.