代写范文

留学资讯

写作技巧

论文代写专题

服务承诺

资金托管
原创保证
实力保障
24小时客服
使命必达

51Due提供Essay,Paper,Report,Assignment等学科作业的代写与辅导,同时涵盖Personal Statement,转学申请等留学文书代写。

51Due将让你达成学业目标
51Due将让你达成学业目标
51Due将让你达成学业目标
51Due将让你达成学业目标

私人订制你的未来职场 世界名企,高端行业岗位等 在新的起点上实现更高水平的发展

积累工作经验
多元化文化交流
专业实操技能
建立人际资源圈

cs代写:Rotating Polygon

2018-03-23 来源: 51due教员组 类别: 更多范文

下面为大家整理一篇优秀的assignment代写范文- Rotating Polygons,供大家参考学习,这篇论文讨论了如何使用OpenGLGLSL绘制并一些正则多边形。

Polygon,OpenGL,assignment代写,cs代写,作业代写

In this assignment, you will draw and animate some regular polygons using OpenGL and GLSL. This is intended as a warm up and will introduce some concepts that will be used throughout the rest of the course. The main aims of the practice are:

to familiarize yourself with the components of an OpenGL program;

to experiment with small vertex and fragment shaders using GLSL;

to define a simple 2D mesh by hand;

to implement a simple animation and separate what occurs once versus what occurs every time a frame is rendered;

to familiarize yourself with the various GL libraries we will use, including GLFW, GLEW and glm.

This assignment related to the following ACS CBOK areas: abstraction, design, hardware and software, data and information, HCI and programming.

We are using OpenGL version 3.3 and GLSL version 330 as a standard in this course. This version is the most widely supported at the moment — it runs on the Red Hat lab machines, and on almost all Linux, Mac and Windows PCs that support OpenGL from the past 5 years.

We are using the OpenGL core profile. This means you may NOT use the OpenGL “fixed function” pipeline that was deprecated from OpenGL version 3.1 onwards, or “immediate mode” functions such as glVertex and glColor. If you are not sure, the appendix of the OpenGL 3 specification lists removed functionality, or you can ask on the course forums.

When you submit your code, you can assume the GLFW, GLEW and glm libraries are available in standard system locations. This means you can

#include <GL/glew.h>

#include <GLFW/glfw3.h>

#include <glm/glm.hpp>

1

2

3

4

5

#include <GL/glew.h>

#include <GLFW/glfw3.h>

#include <glm/glm.hpp>

and so on, and the libraries will be found.

What you have to do:

Draw a polygon

Plan out how to draw a regular polygon with n sides as a mesh of triangles, for any number n > 2. The triangles should fill the polygon exactly, and not overlap. Then write a function to calculate the vertex locations and generate a vertex array that OpenGL can use to draw the polygon.

Use your function to draw 4 polygons on screen in a 2 by 2 grid. The top row should contain 2 renders of an m-sided polygon, while the bottom row contains 2 copies of an n-sided polygon. m and n are provided as command line parameters when the program is invoked, as follows:

./assign1 m n

Implement a switch between drawing filled and outline shapes by pressing the L key. This allows you to view the polygon as either a filled shape or as a wireframe showing the outline of each triangle.

Animate the polygons

Using the glm library functions, make each polygon a different size, and make each polygon rotate about its center at a constant speed. Rotate the polygons in the left column about their z axis, and the polygons on the right about the y axis. Flip the polygons in the right column vertically about their center so they appear upside down.

Shade the polygons

Write GLSL fragment shader code to draw a pattern on each polygon. The exact pattern is up to you, but it should be more complex that a color gradient.

51due留学教育原创版权郑重声明:原创assignment代写范文源自编辑创作,未经官方许可,网站谢绝转载。对于侵权行为,未经同意的情况下,51Due有权追究法律责任。主要业务有assignment代写、essay代写、paper代写、cs代写服务。

51due为留学生提供最好的assignment代写服务,亲们可以进入主页了解和获取更多assignment代写范文 提供作业代写服务,详情可以咨询我们的客服QQ:800020041。

上一篇:assignment代写:Web UI design 下一篇:assignment代写:malloc lab