Write a program in C/C++ to draw the following points: (0.0,0.0), (20.0,0.0), (20.0,20.0), (0.0,20.0) and (10.0,25.0). For this purpose, you may use the GL_POINTS primitive.Write a program in C/C++ to draw the following points: (0.0,0.0), (20.0,0.0), (20.0,20.0), (0.0,20.0) and (10.0,25.0). For this purpose, you may use the GL_POINTS primitive.​

Answers

Answer 1

Introductory program; just a static picture of a colored triangle.
Shows how to use GLUT.
Has minimal structure: only main() and a display callback.
Uses only the default viewing parameters (in fact, it never mentions viewing at all). This is an orthographic view volume with bounds of -1..1 in all three dimensions.
Draws only using glColor and glVertex within glBegin and glEnd in the display callback.
Uses only the GL_POLYGON drawing mode.
Illustrates glClear and glFlush.
triangle.cpp
// A simple introductory program; its main window contains a static picture
// of a triangle, whose three vertices are red, green and blue. The program
// illustrates viewing with default viewing parameters only.

#ifdef __APPLE_CC__
#include
#else
#include
#endif

// Clears the current window and draws a triangle.
void display() {

// Set every pixel in the frame buffer to the current clear color.
glClear(GL_COLOR_BUFFER_BIT);

// Drawing is done by specifying a sequence of vertices. The way these
// vertices are connected (or not connected) depends on the argument to
// glBegin. GL_POLYGON constructs a filled polygon.
glBegin(GL_POLYGON);
glColor3f(1, 0, 0); glVertex3f(-0.6, -0.75, 0.5);
glColor3f(0, 1, 0); glVertex3f(0.6, -0.75, 0);
glColor3f(0, 0, 1); glVertex3f(0, 0.75, 0);
glEnd();

// Flush drawing command buffer to make drawing happen as soon as possible.
glFlush();
}

// Initializes GLUT, the display mode, and main window; registers callbacks;
// enters the main event loop.
int main(int argc, char** argv) {

// Use a single buffered window in RGB mode (as opposed to a double-buffered
// window or color-index mode).
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);

// Position window at (80,80)-(480,380) and give it a title.
glutInitWindowPosition(80, 80);
glutInitWindowSize(400, 300);
glutCreateWindow("A Simple Triangle");

// Tell GLUT that whenever the main window needs to be repainted that it
// should call the function display().
glutDisplayFunc(display);

// Tell GLUT to start reading and processing events. This function
// never returns; the program only exits when the user closes the main
// window or kills the process.
glutMainLoop();
}

Related Questions

Put these events in the order in which they occurred,
starting with the earliest.

b
Germany prepares for an imminent attack on the island of
Sardinia.



Spanish officials pass off the information in the briefcase to
German agents.

Local fisherman recover the body of Major Martin off the coast
of Spain

Major Martin's name appears on a casualty list in a British
newspaper

Answers

Answer:

Local fisherman recover the body of Major Martin off the coast  of Spain .Spanish officials pass off the information in the briefcase to  German agents.Major Martin's name appears on a casualty list in a British  newspaper.Germany prepares for an imminent attack on the island of  Sardinia.

Explanation:

This above is the order in which Operation Mincemeat was executed in WW2 to deceive the Germans into believing that the Allies were going to invade the Balkans directly instead of Sicily which was their actual target.

The plan involved a fictitious Major Martin who had secret documents about the Allied invasion of the Balkans. After the body was released from a British submarine, it washed up in Spain where it was found by local fishermen.

Spanish officials then passed the information in the briefcase Major Martin had to German intelligence. To further reinforce the ruse, the British published Major Martin's name in a casualty list.

The Germans were thoroughly convinced and switched forces from Sicily for the defence of the Balkans and the island of Sicily.

second question today 25 POINTS: What is the formula to balance a lever when both effort and resistance are present?

Answers

Answer:

To find the MA of a lever, divide the output force by the input force, or divide the length of the resistance arm by the length of the effort arm. In a first-class lever the fulcrum is located at some point between the effort and resistance forces.

Explanation:

The key operation in encryption and decryption process is the exponentstion. Given an integer x it is easy to write a linear algo O((n)) to find x^n for any integer n. Describe the maths of a fast exponentation algo that can compute x^n in o(log2n) time. Justify

Answers

Answer:

Following are the solution to this question:

Explanation:

[tex]x^n[/tex] could be approximated by getting a small n loop as well as multiplying x for each incarnation in a linear time. It's very simple. Its key concept is to do it in log2n time.  

[tex]x^n = x^{\frac{n}{2}}\ is \ obvious \ \ x^{\frac{n}{2}}[/tex]

Therefore,[tex]x^{n}, x^{\frac{n}{2}}[/tex] could be determined and divided by itself instead of [tex]x^n[/tex] calculation. It must be done frequently to ensure which half the research is done out with each stage.

Runtime:

Its repetition relationship of the above function is:

[tex]T(n) = T(\frac{n}{2}) + 1[/tex]

This can be resolved by master theorem, so it's obvious. The running time of this repeating ration, by master theorem, is [tex]O ( \log_2n )[/tex].

Pseudocode:

int exponent( int x_1, int y_1 )//defining a method exponent

{

if(y_1==1) //use if to check n value equal to 1  

  {return x_1;} //return x value

  Int t= exponent(x_1,y_1/2);//call method    

return t*t;//calculate  square

}

Sarah used a grid to create this layout for a website. Which rule of composition did Sarah use for the grid?



A.
unity
B.
rule of thirds
C.
contrast
D.
rhythm

Answers

Answer:

B rule of thirds

Explanation:

Answer:

a

Explanation:

1.1 Define the following terms: data, database, DBMS, database system, database catalog, program-data independence, user view, DBA, end user, canned transaction, deductive database system, persistent object, meta-data, and transaction-processing application

Answers

Explanation:

data: refers to a collection of unprocessed factsdatabase: database is a term used to describe a collection of related dataDBMS: is an acronym that means Database Management Systems; as the name implies, they are computer application systems designed to create and manage/maintain the operations of a database.database system: is a system designed specifically for the administration of a database.database catalog: the database catalog is a list containing information related to the type of each file in the database, and other information related to the data. program-data independence: this is term used to refer to the act of separating the program and the data. In other words, the programs and the data definitions of a database are independently separated. user view: it refers to how a database appears to the user.DBA: DBA (Database Administrator) refers to someone who is in charge of authorizing access to a database, and also runs the operations of the database, like updating software, etc end-user: the end user of a database refers to those who benefit primarily from the database, like searching for queries, creating reports, etc. canned transaction: employs the use of standard queries and updates on the database.deductive database systems: This type of database systems provides capability for defining deduction rules for new information from the stored database. persistent object: any stored object in a DBMS program that can survive (or be retrieved) after the program is terminated is called a persistent object.meta-data: includes information about the format or structure of files in the database, etc. transaction-processing application: is an application that allows for the retrieval, removal, or modification of database files. It basically aides the smooth running of the database operations.

explain the types of computer on the basis of work​

Answers

Answer:

There are three types of the computer on the basis of work. They are analog, digital, and hybrid computer.  The computer that work with natural phenomena and physical values like earthquake measurement, speed of the wind, weight light etc is known as Analog computers.

Explanation:

why ROM is called non volatila Memory?​

Answers

Answer:

Explanation:

ROMs that are read only memory are called non volatile because all of the data that are inside it happens to not get erased after shutting down the system or computer and starting it all over again. The opposite is this phenomenon is RAM. In RAM, they are being called volatile because all of the data that are inside it happens to get erased once shutting down of the system or computer occurs and it is being restarted.

This is telling us that ROM irrespective, stores data while it is on and also while it is off, it doesn't matter. It never forgets data, unless of course, in a situation whereby it is erased.

Volatile memory stores data as long as it is powered. ROM, which stands for read-only memory, is called non-volatile memory because of they do not lose memory when power is removed. Data stored in ROM cannot be electronically modified after the manufacture of the memory device.

HOPE IT HELPS

PLEASE MARK ME BRAINLIEST ☺️

Write a class called Date that represents a date consisting of a day, month, and year. A date object should have the following methods: public Date(int day, int month, int year) -- Constructs a new Date object to represent the given date public int getDay() -- returns the day value of this date public int getMonth() -- returns the month value of this date public int getYear() -- returns the year value of this date public void addDays(int days) -- Moves the Date object forward in time by the given number of days public int daysTo(Date other) -- Returns the number of days between this Date and the other Date public boolean isLeapYear() -- Returns true if the year of this Date is a leap year. A leap year occurs when the value of the year is divisible by 4, except when it is divisible by 100 and not 400 (so 1700, 1800, and 1900 are not leap years) public String toString() -- returns a String representation of this date in the form day/month/year Write a program in which to test your class. This program should prompt the user to enter the days, months, and years of two separate dates, and then print out the number of days between these two dates.

Answers

Answer:

No

Explanation:

Because it's years and its also very public

A coworker just sent you a presentation to review. You noticed that she used different types of transitions on the same slide, and the animations and videos were distracting from the topic. Give your coworker advice about guidelines she can follow when using animation, transitions, and multimedia. Be sure to include at least four guidelines

Answers

Answer:

The transitions presented should either be different on each slide or the same type but only one on each slide shown. Pictures and videos shouldnt be included a lot. At least two photos or one on each slide, while videos should only be one on the very last slide.

Explanation:

Write a Java statement that declares and creates an array of Strings named Breeds. Your array should be large enough to hold the names of 100 dog breeds.

Answers

Answer: String[]Breeds = new String[100]

Write a program that assigns a value the value of 50000 to an integer variable x, assigns the value of x*x to an integer variable y, and then prints out the value of y.

Answers

Answer:

Explanation:

The following code is written in Java and does exactly what the question asks. The variables are long variables instead of integers because integer variables can only be a maximum of 2147483647 and the product of these two variables is much higher than that.

public static void main(String args[]) {

               long x = 50000;

               long y = x * x;

               System.out.println(y);

       }

Which protocol is well known for its use in the the home security and home automation industry, uses a mesh topology, makes devices act as repeaters, and has a low data transfer rate

Answers

Answer:

Z-Wave

Explanation:

Z-WAVE can be seen as a protocol which enables home automation and home security to take place because with home automation home appliances as well as lighting , sound systems among others can be smoothly control and monitor.

Secondly Z-WAVE make uses of mesh network, allow appliances to smoothly and successful communicate with each other.

Lastly Z-WAVE which is a wireless protocols make use of data transfer rate that is low.

Therefore Z-WAVE is important because it enables wireless monitoring of home appliances to take place in a smart home.

Given the following knowledge representation, what is a simple English sentence that it represents? PTRAN agent=John object=John from=London to=? instrument= PROPEL agent=plane object=plane from=? to=London and PTRAN agent=John object=John from=? to=plane

Answers

Answer:

John is from London and is on a plane to London

Explanation:

The is known as a parallel text alignment or parallel translator.

. A Worker in Microworkers can also be an Employe

Answers

Answer:

A Worker in Microworkers can also be an Employer: After reaching $25 in earnings. After placing an initial deposit of $10, and launching a valid campaign. If success rate is maintained at 75% before launching a campaign. After creating a separate Employer account.

Explanation:

What is a feature of Print Preview?

Fit to Document
Fit to Margin
Fit to Page
Fit to Size

Answers

fit to page i believe

Answer:c

Explanation:

Plz help me

What is a challenge in wild animal photography?


A. They are easy to close to


B. They don’t move much


C. You can’t position them


D. All of the above

Answers

Answer: C
Explanation: You cannot just go up to a wild animal and make it move to wherever you want it to be. In other words, you cannot manipulate nature.

Answer:

C. You can’t position them for K12

A(n) ___________________ is a set of characters that the originator of the data uses to encrypt the text and the recipient of the data uses to decrypt the text. (230)Group of answer choices

Answers

Answer:

The appropriate response will be "Public key".

Explanation:

A public key would be created in something like such key encryption cryptography consisting incorporates asymmetric encryption of the keys algorithms. Those same keys have been utilized to transform a document to even such an unintelligible form. Decryption consists done using only a separate, however corresponding, secret address or private key.

As per the scenario, a Public key would be the set of such characters.

A public key would have been generated using cryptographic protocols or the techniques, which contains asymmetric keyword encrypted methods.These very same keys were being used to convert a memorandum or manuscript to such an unintelligible state. Decryption has always been accomplished solely through the use of a completely separate, but associated, highly classified address and otherwise key.

Thus the above response is correct.

Learn more:

https://brainly.com/question/20709892

1.4 Assume the source port number used by the above browser is 5100. Now a second browser is opened on the client also wants to request the same webpage. Does the second browser use the same source port number of 5100? Why? What is the destination port number?

Answers

Answer:

100000001

Explanation:

A website that sells computer hardware to large organizations --> .com. A website operated by the state of California --> .gov. The website of the US Coast Guard --> .mil. The website of a group of individuals who work toward protecting gray wolves --> .org

What is the government website?

The government website is the official US government website and is used for a domain name that is based on the word government. It is administrated by the cyber security and infrastructure security agency.

It is sponsored top level domain and only the US government is federal govt uses such websites.a website that sells computer hardware to large organizations a website operated by the state of California.

The website of the US Coast Guard the website of a group of individuals who work toward protecting gray wolves. a website that sells computer hardware to large organizations a website operated by the state of California.

Therefore, A website that sells computer hardware to large organizations --> .com. A website operated by the state of California --> .gov. The website of the US Coast Guard --> .mil. The website of a group of individuals who work toward protecting gray wolves --> .org

Find out more information about the driver's license on:

brainly.com/question/13112961

#SPJ2

Which statement is true about the Internet and the World Wide Web?


A•The World Wide Web is a way to access the internet

B•The internet is the World Wide Web

C•The internet is a way to access the World Wide Web

D•The World Wide Web is the only way to access the internet

Answers

Answer:

C

Explanation:

The world wide web are the pages you see when you're at a device and you're online. But the internet is the network of connected computers that the web works on, as well as what emails and files travel across.

In this question, only the "Option c" is correct which can be defined as follows:

The World Wide Web (WWW) is one way of accessing the information on the web. Even if it occupies a significant portion of the web and is the most popular, the two notions should not be viewed as synonyms because they are not the same.The WWW is indeed the pages while you're online on a computer device.This network of interconnected machines upon, that the web operates, as well as a medium through the emails and data, are being sent and received.

The wrong choices can be defined as follows:

In option a and Option d, both are wrong because it's the universe of network-accessible data, a manifestation of human understanding.In option b, it is wrong because it is a global network of networks, the Internet is also known as WWW.

Learn more:

Internet: brainly.com/question/20341337

Which statement best describes the two main families of fonts

Answers

Answer:

There are five basic classifications of typefaces: serif, sans serif, script, monospaced, and display.

Explanation:

running away from home

Answers

Answer:

wait what?

Explanation:

Well heads up

Be careful theres guys and woman to take advange of you so stay careful

Human trafficking is such a horrible thing :C

Variable X is a *
Public Class Form)
Sub Example 10 Handles MyBase.load
Dim X As Integer
X = 10
MsgBox("The value of X is "& X)
End Sub

Answers

Answer:

Variable X is a local variable.

Explanation:

X exists only inside the sub.

Your manager has asked you to write a program that displays the percentage of males and female in your class. The program should prompt the user to enter the number of males and females and display the results.

Answers

Explanation:

The program using python programming language would be:

First, we write the Input prompt.

Input  prompt for the user

number_of_males_in_class = int (input ('Enter the number of males: '))

number_of_females_in_class = int(input('Enter the number of females: '))

Next, we write the Process algorithm.

Process  algorithm

total_number_of_students_in_class = number_of_females_in_class + number_of_males

_in_class

percentage_of_males_in_class = number_of_males_in_class / total_number_of_students

_in_class

percentage_of_females_in_class = number_of_females / total_number_of_students

Finally, the Output process

Output process

print('Total number of males in class =', format(percentage_of_males_in_class, '.0%'))

print('Total number of females =', format(percentage_of_females_in_class, '.0%'))

A customer connects to your business network. The customer uses a packet sniffer to intercept network traffic in an attempt to find confidential information. This is an example of which type of attack

Answers

Answer:

Self Attack

Explanation:

I pick self attack because the person is trying to harm you.

Search for articles describing front end and back end design of any application (example, a website). Summarize the concepts and elements for each one. Does the database that holds all the data exist at the front end or the back end

Answers

Answer:

No, the database is a back-end utility.

Explanation:

A webpage is a page of a website. The website is the collection of internet pages addressing particular information or service. There are two sides of web development, that is the front-end and back-end web development.

The front-end is the part of a website that interacts or is seen by the user of the website. The back-end developer scripts it to connect the server, route the webpages and communicate the data in the database.

Sam is conducting research for a school project on the American Revolution. Which of the following kinds of software will help with research notes? music editing software word processing software presentation software spreadsheets

Answers

Answer:

Students analyze the techniques that make for good storytelling I think. :}

Explanation:

[] Hello ! []

Answer:

B. Word Processing Software

Explanation:

I hope it helped! :]

Which ad extensions can serve automatically?

Answers

Answer:

Sitelink, structured snippets, and callout.

Explanation:

Those 3 are the 3 main ad extensions that can serve automatically. I learned this on Monday.  

What are two items that are visible from the Month view?

events and item details
meeting locations and tasks
tasks and item details
appointments and events

Answers

Answer:You can do this by clicking and holding down your mouse button an a day in the Date Navigator (small calendar on the side). Then drag your mouse over the days which you want to select. When your selection spans more than a week, you're selected weeks will be shown in the Month view.

Explanation:

You can do this by clicking and holding down your mouse button an a day in the Date Navigator (small calendar on the side). Then drag your mouse over the days which you want to select. When your selection spans more than a week, you're selected weeks will be shown in the Month view.

How can you reboot a laptop?
How do you get an upgrade for a tower?
Lastly, How do u get a Virus Protection.

Answers

Question: How can you reboot a laptop?

Answer: Rebooting a computer simply means to restart it. If you're using Microsoft Windows, you can click the "Start Menu," click the "Power" button and click "Restart" in the submenu to restart your computer. If you still have problems with the computer, you can also choose the "Shut Down" option in the "Power" submenu to turn the computer off altogether, let it sit for a bit and then turn it back on.

Question: How do you get an upgrade for a tower?

Answer: You can upgrade your existing Tower installation to the latest version easily. Tower looks for existing configuration files and recognizes when an upgrade should be performed instead of an installation. As with installation, the upgrade process requires that the Tower server be able to access the Internet. The upgrade process takes roughly the same amount of time as a Tower installation, plus any time needed for data migration. This upgrade procedure assumes that you have a working installation of Ansible and Tower.

Question: How do you get a Virus Protection?

Answer: Use an antimalware app - Installing an antimalware app and keeping it up to date can help defend your PC against viruses and other malware (malicious software). Antimalware apps scan for viruses, spyware, and other malware trying to get into your email, operating system, or files.

Hope this helps! :)

i want to touch it but if i talked about the past , it would be i wanted to touch it or i wanted to touched it?​

Answers

Answer:

I wanted to touch it

Explanation:

since you put the setting in the past you can use present verbs because we already know it's something that already happened

Other Questions
WILL MARK BRAINLIEST!!!! BRAINLIEST!Write 206 in base 7 A cat who climbed the tree. Who were the THREE authors of the Federalist Papers? ill give brainiestGeorge WashingtonJohn JayJames MadisonJohn AdamsAlexander Hamilton (2x+1)^2 - (x+3)^2 simplify 47:19 The English Bill of Rights (1689), which guarantees the freedom of speech, the right to a fair trial, and a ban on cruel or unusual punishment, inspired the US Bill of Rights, which is another name for the first ten amendments to the Constitution. the preamble to the Declaration of Independence. the Articles of Confederation. the Declaration of the Rights of Man. a student studying public policy created a model for the population of Detroit which decreased 2.09% over a year in 2010 there was 730000 residents assuming this trend continues each year, write a function for p, the population t years after 2010 Which properties do all solids share?A. Color and fixed shapeB. Color and fixed volumeC. Fixed volume and fixed shapeD. Fixed shape; volume that depends on container Which of the following rulers is considered by historians to be the father of Athenian democracy?A)SolonB)CleisthenesC)DracoD)Pericles why was life in the colonies important? What is the solution to the following proportion?18/x = 3/2 How do you find the rhyme scheme of a poem? A) Circle every word in the poem that starts with the same letter B) Looking at the end word in each line and identifying the pattern C) Poems dont have rhyme schemes D) Looking at the first word in each line and finding any words in that line that rhyme 15 points pleasee helpp !! The accountant for Crusoe Company is preparing the company's statement of cash flows for the fiscal year just ended. The following information is available: Retained earnings balance at the beginning of the year $ 132,000 Cash dividends declared for the year 52,000 Proceeds from the sale of equipment 87,000 Gain on the sale of equipment 8,200 Cash dividends payable at the beginning of the year 24,000 Cash dividends payable at the end of the year 27,200 Net income for the year 98,000 What is the ending balance for retained earnings Which of the following is NOT a legacy of FDR?A) U.S. as a world powerB) women in the workplaceC) an enlarged Supreme CourtD) Social Security Determine if the two triangles are congruent. If they are, state how you know.A. SASB. not enough information C. SSS D. AAS Raul Buys a fancy new TV on sale for $600 the original price of the TV was $899 what is the percent savings 7. Here is a polygon:00 Aa. Draw the dilation of ABCD using center A and scale factor Label the dilationEFGHb. Draw the dilation of ABCD with center D and scale factor , Label the dilationIJKLC. Show that EFGH and I JKL are similarplz answer quick i need it now whoever has the Correct answers i will give a brainliest how does a tiny seed turn into a tree overtime? Can a wheel make 72 revolutions per minute What cell part is described as the organic material between the membrane and nucleus, which contains a variety of tiny bodies or organelles?A. CytoplasmB. MitochondriaC. Cell WallD. Golgi ComplexE. ChloroplastsF. Endoplasmic Reticulum