平均能量损失

平均能量损失

3D形式将如何绘制这幅图?抛物线,圆,椭圆和双曲线3D

答案1

好吧,我记得这个问题已经完成了“3D”锥体,我们可以窃取那里的代码,这样就省去了一半的麻烦。实际上,2D 绘图如下所示(当没有透视时 - \p=0):

在此处输入图片描述

其中彩色线是切割圆锥的平面。从Mark Wibrow 的回答我们可以使用计算出的\rx\ry值来找到双曲线和抛物线的起始位置,并定义它们的弯曲坐标。透视的关键在于这个弯曲与圆锥边缘相切,因此我们还计算了切线角(必须将其作为制作圆锥的参数给出)。最后,给出一些透视(0<\p<1)到上一个绘图,它看起来像这样:

在此处输入图片描述

平均能量损失

% Most of the code is taken from https://tex.stackexchange.com/a/332015/81905
%Courtesy of Mark Wibrow
\documentclass[border=5]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[parabola/.style={very thin, red}, hyperbola/.style={very thin, violet}, circle/.style={very thin, blue}]
\def\b{2}
\def\h{2}
\def\p{0.5}
\pgfmathsetmacro{\rx}{\b/2}
\pgfmathsetmacro{\ry}{\rx*\p}
\pgfmathsetmacro{\ta}{90-atan2(\h,\ry)}
\fill[gray!50]
(0, \h) -- (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry) -- cycle;
\fill[gray!75] coordinate (bottom) ellipse [x radius=\rx, y radius=\ry];
\draw[dashed] (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry);
\draw (0, \h) -- (\ta:\rx+0 and \ry) arc (\ta:-180-\ta:\rx+0 and \ry) -- coordinate[pos=.4](hypbend) cycle;
\begin{scope}[rotate around={180:(0,\h)}]
\fill[gray!50]
(0, \h) -- (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry) -- cycle;
\fill[gray!75] coordinate (top) ellipse [x radius=\rx, y radius=\ry];
\draw (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry) (0, \h) -- coordinate[pos=.3](parabend) (\ta:\rx+0 and \ry) arc (\ta:-180-\ta:\rx+0 and \ry) -- cycle;
\end{scope}
%% Dots & Axis
\fill (top) circle[radius=1pt] (0,\h) circle[radius=1pt] (bottom) circle[radius=1pt];
\draw[dotted] (top) -- (bottom);
\draw (top) -- ++(-90:\rx+0 and \ry);
%% Parabola
\path (top) +(50+50*\p:\rx+0 and \ry) coordinate (tmp) +(-50+50*\p:\rx+0 and \ry) coordinate (tmp2);
\draw[parabola] (tmp) ..controls ++(-90:0) and ++(\ta+90:\p).. (parabend) node[left]{Parabola} ..controls ++(\ta-90:\p) and ++(-90:0).. (tmp2);
%% Circle
\def\pos{0.5}
\draw[circle] (0,\pos*\h) ellipse [x radius=\pos*\rx, y radius=\pos*\ry] +(180:\pos*\rx) node[above left]{Circle};
%% Hyperbola
\path (bottom) +(130-50*\p:\rx+0 and \ry) coordinate (tmp) +(230+50*\p:\rx+0 and \ry) coordinate (tmp2);
\draw[hyperbola] (tmp) ..controls ++(90:0) and ++(90-\ta:0.6*\p).. (hypbend) node[left]{Hyperbola} ..controls ++(-\ta-90:0.6*\p) and ++(90:0).. (tmp2);
\end{tikzpicture}
\end{document}

您可以尝试调整透视值以更好地进行调整。请注意,我并不声称这幅画是真实的 3D 画,这只是透视的错觉,我没有计算任何东西来确保真实的深度感知!!

答案2

请帮我做一些修改。现在我需要添加与圆锥相交的平面,并查看相交点是否是所寻求的圆锥曲线

\documentclass[12pt,a4paper]{article}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amscd}
\usepackage[latin2]{inputenc}
\usepackage{t1enc}
\usepackage[mathscr]{eucal}
\usepackage{indentfirst}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{pict2e}
\usepackage{epic}
\numberwithin{equation}{section}
\usepackage{epstopdf} 
\usepackage{pgf,tikz,tkz-euclide}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc,patterns,angles,quotes,arrows,intersections,through,backgrounds,arrows.meta}
\usetkzobj{all}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{patterns}
\title{Conicas : }
\begin{document}
\maketitle
\begin{center}
\begin{tikzpicture}[parabola/.style={very thin, red}, hyperbola/.style={very thin, violet}, circle/.style={very thin, blue}]
\def\b{2}
\def\h{2}
\def\p{0.5}
\pgfmathsetmacro{\rx}{\b/2}
\pgfmathsetmacro{\ry}{\rx*\p}
\pgfmathsetmacro{\ta}{90-atan2(\h,\ry)}

\fill[white](0, \h) -- (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry) -- cycle;
\fill[white] coordinate (bottom) ellipse [x radius=\rx, y radius=\ry];
\draw[dashed] (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry);
\draw (0, \h) -- (\ta:\rx+0 and \ry) arc (\ta:-180-\ta:\rx+0 and \ry) -- coordinate[pos=.4](hypbend) cycle;
\begin{scope}[rotate around={180:(0,\h)}]
\fill[white](0, \h) -- (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry) -- cycle;
\fill[white] coordinate (top) ellipse [x radius=\rx, y radius=\ry];
\draw (\ta:\rx+0 and \ry) arc (\ta:180-\ta:\rx+0 and \ry) (0, \h) -- coordinate[pos=.3](parabend) (\ta:\rx+0 and \ry) arc (\ta:-180-\ta:\rx+0 and \ry) -- cycle;
\end{scope}

%% Parabola
\path (top) +(50+50*\p:\rx+0 and \ry) coordinate (tmp) +(-50+50*\p:\rx+0 and \ry) coordinate (tmp2);
\fill[parabola,gray!50] (tmp) ..controls ++(-90:0) and ++(\ta+90:\p).. (parabend) node[left]{Parabola} ..controls ++(\ta-90:\p) and ++(-90:0).. (tmp2);

%% Dots & Axis
\fill (top) circle[radius=1pt] (0,\h) circle[radius=1pt] (bottom) circle[radius=1pt];
\draw[dotted] (top) -- (bottom);
\draw (top) -- ++(-90:\rx+0 and \ry);
\end{tikzpicture}
\end{center}
\end{document}

结果

相关内容