Добавил:
Angel_of_Death
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
#include "stdafx.h"
#include "Cone.h"
#include <iostream>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
Cone::Cone():Circle()
{
V = 0;
}
void Cone::Volume(Point p, Point h, Circle s)
{
S = s.GetSquare();
H = sqrt((h.GetX() - p.GetX())*(h.GetX() - p.GetX()) + (h.GetY() - p.GetY())*(h.GetY() - p.GetY()));
V = (H * S) / 3;
}
void Cone::View(Point p, Point h)
{
cout << "Parameters Line: " << endl;
cout << "x = " << p.GetX() << ", " << "y = " << p.GetY() << endl;
cout << "x2 = " << h.GetX() << ", " << "y2 = " << h.GetY() << endl;
cout << "H = " << H << endl;
cout << "S = " << S << endl;
cout << "V = " << V << endl;
}
Cone::~Cone()
{
}