计算机代写|计算机图形学代写computer graphics代考|CS148

计算机代写|计算机图形学代写computer graphics代考|Area of a Shape

The area of a polygonal shape is readily calculated from its list of coordinates. For example, using the list of coordinates shown in Table 5.1: the area is computed by $$\text { area }=\frac{1}{2}\left[\left(x_0 y_1-x_1 y_0\right)+\left(x_1 y_2-x_2 y_1\right)+\left(x_2 y_3-x_3 y_2\right)+\left(x_3 y_0-x_0 y_3\right)\right] .$$
You will observe that the calculation sums the results of multiplying an $x$ by the next $y$, minus the next $x$ by the previous $y$. When the last vertex is selected, it is paired with the first vertex to complete the process. The result is then halved to reveal the area. As a simple test, let’s apply this formula to the shape described in Fig. 5.3:
\begin{aligned} &\text { area }=\frac{1}{2}[(1 \times 1-3 \times 1)+(3 \times 2-3 \times 1)+(3 \times 3-1 \times 2)+(1 \times 1-1 \times 3)] \ &\text { area }=\frac{1}{2}[-2+3+7-2]=3 . \end{aligned}
which, by inspection, is the true area. The beauty of this technique is that it works with any number of vertices and any arbitrary shape. The origin of this technique is revealed in Chap. 7.

Another feature of the technique is that if the set of coordinates is clockwise, the area is negative, which means that the calculation computes vertex orientation as well as area. To illustrate this feature, the original vertices are reversed to a clockwise sequence as follows:
\begin{aligned} &\text { area }=\frac{1}{2}[(1 \times 3-1 \times 1)+(1 \times 2-3 \times 3)+(3 \times 1-3 \times 2)+(3 \times 1-1 \times 1)] \ &\text { area }=\frac{1}{2}[2-7-3+2]=-3 . \end{aligned}
The minus sign confirms that the vertices are in a clockwise sequence.

计算机代写|计算机图形学代写computer graphics代考|Polar Coordinates

Polar coordinates are used for handling data containing angles, rather than linear offsets. Figure $5.7$ shows the convention used for $2 \mathrm{D}$ polar coordinates, where the point $P(x, y)$ has equivalent polar coordinates $P(\rho, \theta)$, where:
\begin{aligned} &x=\rho \cos \theta \ &y=\rho \sin \theta \ &\rho=\sqrt{x^2+y^2} \ &\theta=\arctan \left(\frac{y}{x}\right) . \end{aligned}
For example, the point $Q(4,0.8 \pi)$ in Fig. $5.7$ has Cartesian coordinates:
\begin{aligned} &x=4 \cos (0.8 \pi) \approx-3.24 \ &y=4 \sin (0.8 \pi) \approx 2.35 \end{aligned}
and the point $(3,4)$ has polar coordinates:
\begin{aligned} &\rho=\sqrt{3^2+4^2}=5 \ &\theta=\arctan \left(\frac{4}{3}\right) \approx 53.13^{\circ} . \end{aligned}
These conversion formulae work only for the first quadrant. The atan2 function should be used in a software environment, as it works with all four quadrants.

计算机图形学代考

计算机代写|计算机图形学代写computer graphics代考|Area of a Shape

$$\text { area }=\frac{1}{2}\left[\left(x_0 y_1-x_1 y_0\right)+\left(x_1 y_2-x_2 y_1\right)+\left(x_2 y_3-x_3 y_2\right)+\left(x_3 y_0-x_0 y_3\right)\right] .$$

$$\text { area }=\frac{1}{2}[(1 \times 1-3 \times 1)+(3 \times 2-3 \times 1)+(3 \times 3-1 \times 2)+(1 \times 1-1 \times 3)] \quad \text { area }=\frac{1}{2}$$

$$\text { area }=\frac{1}{2}[(1 \times 3-1 \times 1)+(1 \times 2-3 \times 3)+(3 \times 1-3 \times 2)+(3 \times 1-1 \times 1)] \quad \text { area }=\frac{1}{2}$$

计算机代写|计算机图形学代写computer graphics代考|Polar Coordinates

$$x=\rho \cos \theta \quad y=\rho \sin \theta \rho=\sqrt{x^2+y^2} \quad \theta=\arctan \left(\frac{y}{x}\right) .$$

$$x=4 \cos (0.8 \pi) \approx-3.24 \quad y=4 \sin (0.8 \pi) \approx 2.35$$

$$\rho=\sqrt{3^2+4^2}=5 \quad \theta=\arctan \left(\frac{4}{3}\right) \approx 53.13^{\circ} .$$

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: