answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Norma-Jean [14]
2 years ago
10

Consider the clipping of a line segment in two dimensions against a rectangular clipping window. Show that you require only the

endpoints of the line segment to determine whether the line segment is not clipped, is partially visible, or is clipped out completely.

Computers and Technology
1 answer:
Semmy [17]2 years ago
6 0

Answer / Explanation:

Assuming we define the end points as ( x₁ , y₁) and (x₂ , y₂) and the rectangular window edge as ( Xmin ,Ymin and Xmax , Ymax)

The illustration of the above assumption is represented in the diagram below.

Now, suppose the line segment is between the points P₁ = ( x₁ , y₁) , and

P₂ = (x₂ , y₂).

We can then create a line recalling and using parametric form,

P(t) = ( 1 - t) P₁ + tP₂ , t ∈ {0 , 1 },

So, for the X axis, we have,

tₓ = P₁ₓ - x ÷ P₁ₓ - P₂ₓ

We need to note that at this point we need to know the minimum and maximum unclipped  values for parameter t from each dimension.

Therefore,

- ( tmin , tmax ) = ( 0,1) means unclipped line

-tmin > tmax means completely clipped out line

– Some other range means partially clipped out line.

You might be interested in
Liza is making a presentation on the sales revenue of her surfboard company’s most popular surfboard models. She wants to emphas
Kazeer [188]
Answer:  
Liza is making a presentation on the sales revenue of her surfboard company’s most popular surfboard models. She wants to emphasize the model names as they appear one by one on the presentation slide. She also wants to depict the sales data for each model. "Goal seek" options can she use to achieve these goals.
6 0
2 years ago
Read 2 more answers
A homeowner uses a smart assistant to set the house alarm, get packages delivery updates, and set time on the outdoor lights. Wh
ch4aika [34]

The example where the alarm of the house set up, delivery updated should be provided, etc should represent the function example of the artificial intelligence.

The following information related to artificial intelligence is:

  • It refers to the human intelligence where the machines could be treated as humans and according to this, the actions should be mimic.
  • It should be used for any kind of machine where the traits should be associated along with the mind of the human-like for learning & problem-solving purpose.

Therefore we can conclude that The example where the alarm of the house set up, delivery updated should be provided, etc should represent the function example of the artificial intelligence.

Learn more about the machine here: brainly.com/question/2555822

3 0
2 years ago
4.9 Code Practice: Question 3
Zanzabum

total = 0

for x in range(99, 0, -1):

   total += x

   print(total)

I hope this helps!

6 0
2 years ago
Read 2 more answers
You are modeling a small part of an online flight reservation system, according to the following description. A flight is a sing
Law Incorporation [45]

Answer:

Explanation:

The database schema can have following tables:

1. airport_table(apcode, apcity, apcountry)

2. airline_table(aid, aname, acountry)

3. flight_table(fid, aid, arrtime, depttime)

4. passenger_table(pid, pname, pcity, pcountry)

5 booking_table(bid, bdate, pid)

See attachment for the diagram

4 0
2 years ago
Write a program that prompts the user to enter 50 integers and stores them in an array. The program then determines and outputs
Marrrta [24]

Answer:

Here is code in C++.

#include <bits/stdc++.h>

using namespace std;

int main()

{  

int n=50;

   // integer array to store 50 integers

   int arr[n];

   cout << "Enter 50 integers: ";

   //read 50 integers into array

   for (int i = 0; i < n; i++)

       cin >> arr[i];

   cout << endl;

   

   //sort the array

   sort(arr,arr+n);

   

   // find all the pairs which give sum equal to any element of the array

   for (int i = 0; i < n; i++)

   {

       cout<<"pair which give sum equal to  ";

       cout << arr[i] <<" is :";

       for (int j = 0; j < n; j++)

           for (int k = j + 1; k < n; k++)

               if (arr[i] == arr[j] + arr[k])

                   cout <<"("<<arr[j]<<" & "<< arr[k] <<")"<<",";

       cout << endl;

       cout << "*******************************" << endl;;

   }

   return 0;

}

Explanation:

Read 50 integers into an array from user.Sort the array in ascending order.Travers the sorted array and find all pairs which give sum of equal to any element of the array.Then print all such pairs.

Output:

Enter 50 integers: 23 30 34 1 3 4 9 12 96 92 80 84 123 54 67 87 34 55 21 38 29 111 10 44 103 47 83 72 77 88 80 56 49 5 102 166 134 200 205 188 178 133 154 148 162 191 193 207 209 44                                                                                                                                                                    

 pair which give sum equal to  1 is :                                                *******************************

pair which give sum equal to  3 is :                                                     *******************************    

pair which give sum equal to  4 is :(1 & 3),                                         ******************************    

pair which give sum equal to  5 is :(1 & 4),                                         ******************************    

pair which give sum equal to  9 is :(4 & 5),                                         *******************************  

pair which give sum equal to  10 is :(1 & 9),                                       *******************************  

pair which give sum equal to  12 is :(3 & 9),                                       *******************************  

pair which give sum equal to  21 is :(9 & 12),                                      *******************************  

pair which give sum equal to  23 is :                                                    *******************************    

pair which give sum equal to  29 is :                                                    *******************************    

pair which give sum equal to  30 is :(1 & 29),(9 & 21),                        *******************************  

pair which give sum equal to  34 is :(4 & 30),(5 & 29),                     *******************************    

pair which give sum equal to  34 is :(4 & 30),(5 & 29),                     *******************************    

pair which give sum equal to  38 is :(4 & 34),(4 & 34),(9 & 29),  

.

.

.

.

  

5 0
2 years ago
Other questions:
  • A router is involved in ____________ layers of the tcp/ip protocol suite.
    12·1 answer
  • Allows you to manually add an entry to the arp cache that resolves the ip address inetaddr to the physical address etheraddr. wh
    13·1 answer
  • FOREACH, EXPLODE and MAIL are examples of crazy functions.
    13·1 answer
  • Which of the following represents the bus topology? Multiple Choice All devices are connected to a central device, called a hub.
    8·1 answer
  • Which term describes a process by which malicious code can enter from a non-secure network, and make a hairpin, or sharp turn, a
    6·1 answer
  • If a stadium pays $20,000 for labor and $13,000 for parking, what is the stadium's profit margin if the game generates $206,000
    7·2 answers
  • Assume a program requires the execution of 50 x 106 FP instructions, 110 x 106 INT instructions, 80 x 106 L/S instructions, and
    9·1 answer
  • Assume the availability of a function is_prime. Assume a variable n has been associated with positive integer. Write the stateme
    15·1 answer
  • Discussion Question 10: A bank in California has 13 branches spread throughout northern California , each with its own minicompu
    13·1 answer
  • Use the loop invariant (I) to show that the code below correctly computes the product of all elements in an array A of n integer
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!