Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CODING IN C AND NOT C++. PLEASE USE ONLY USER-DEFINED FUNCTIONS AND IF/ELSE STATEMENTS ANT NOT SWITCH CASES. Problem: Given three points (A, B, C)

CODING IN "C" AND NOT C++. PLEASE USE ONLY USER-DEFINED FUNCTIONS AND IF/ELSE STATEMENTS ANT NOT SWITCH CASES.

image text in transcribed

Problem: Given three points (A, B, C) that will always create a triangle with a positive area, calculate the location of the orthocenter, circumcenter, and the location of the center of the nine point circle and whether that point is inside or outside of the triangle. How to determine whether the nine point circle center is inside or outside of the triangle? 1. Calculate the area of the three triangles created by (1) points A, B, and the nine point circle center, (2) points B, C, and the nine point circle center, and (3) points C, A, and the nine point circle center. 2. If the total of the three areas is equal to that of the triangle created by points A, B, and C, then the nine point circle center lies inside of the triangle, otherwise it lies outside of the triangle. Comparing two floating-point values for an EXACT match is prone error, for this assignment if the absolute value of the difference between the area of the larger triangle and the total area of the three smaller triangles is less than 0.001 then the values will be considered equivalent. For this assignment you will be required to implement the user-defined functions (from chapter 4). (3.2.3.2) (3.05, 2.55) (2.9.1.9) (1.1) Example Execution #1: Enter X coordinate #1 -> 1 Enter Y coordinate #1 -> 1 Enter X coordinate #2 -> 5 Enter Y coordinate #2 -> 2 Enter x coordinate #3 -> 3 Enter Y coordinate #3 -> 4 Coordinates of orthocenter: 3.20, 3.20 Coordinates of circumcenter: 2.90, 1.90 The nine point circle center: 3.05, 2.55 is inside of the triangle

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions