GithubHelp home page GithubHelp logo

task_2_cone_triangle's Introduction

Task 2: Cone triangle

A small program in C++ that compute coordinates of triangle nodes used to display a conical surface (see below):

The basis of this project is taken from Task_1_curve. They are very similar. The only difference is the DIM constant in the consts.h file, which allows the Curve and Point classes to become 3D and support 3D objects. Since the ellipse is well suited for our purposes, we need to modify it for the base of the cone. The program assumes that the base of the cone always lies in the plane (x1, x2), and the height is drawn perpendicular to the cone (x3). As a basis, we use the Curve (Ellipse) point_per_parameter (double parameter) class method to get the coordinates of the triangle on the circle.

Getting the coordinates is fairly easy to do. Point coordinates are always known (0, 0, height). The coordinates of the other two points are specified parametrically in the Ellipse class.

Documentation

Documentation for Task_1_curve.

Make

make -> output main

Run

./output/main ./main height radius number_of_segments

Structure

|- ./
---| Makefile

---| src/
---|---------| main.cpp
---| include/
---|---------| consts.h
---|---------| Curve.h
---|---------| Ellipse.h
---|---------| Line.h
---|---------| Point.h
---| lib/...
---|output/ 
---|---------|main
---| docs/
---|---------| docbook/
---|---------| html/
---|---------| xml/
---|---------| doxygen_conf

task_2_cone_triangle's People

Contributors

pugavkomm avatar

Watchers

James Cloos 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.