如何才能提供闪亮的色彩?

如何才能提供闪亮的色彩?

我想为我的照片提供美丽的色彩。另外,例如下面的图片是一张闪亮而美丽的图片。

在此处输入图片描述

  \documentclass[tikz]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc}
\begin{document}
\pgfmathsetmacro{\x}{5}
\pgfmathsetmacro{\y}{-60}
\tdplotsetmaincoords{\x}{\y}
\newcommand*{\gridstep}{0.15}
\begin{tikzpicture}[tdplot_main_coords]
\filldraw[fill=white,looseness=1] (3.6,0,-21) coordinate (under surface right) to[bend right] (1.7,3.2,-13) coordinate (under surface left) -- coordinate (middle left) (1.8,3.5,-12) coordinate (bottom left) to[bend left] (4,0,-22) coordinate (bottom right) -- coordinate (middle right) cycle;
\filldraw[fill=green!20,looseness=1] (4,0,-22) to[bend right] (1.8,3.5,-12) -- (1.8,3.5,30) coordinate (top left) to[bend left] (4,0,20) coordinate (top right) -- cycle;

\foreach[count=\ii] \i in {0,\gridstep,...,1}{
        \path (bottom left) to[bend left] coordinate[pos=\i](p\ii) (bottom right);
        \path (under surface left) to[bend left] coordinate[pos=\i](k\ii) (under surface right);
        \draw (p\ii) -- ++(0,0,42);
        \draw (p\ii) -- (k\ii);
        \draw ($(bottom left)!\i!(top left)$) to[bend left] ($(bottom right)!\i!(top right)$);
        };
\draw (middle left) to[bend left] (middle right);
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案1

\shade那么用代替怎么样\filldraw

带球效果

Z 有一个shadings库来进行反思喜欢效果。它并不完美,正如@cfr 在评论中提到的那样:凡事皆有工具。

使用该库可以实现其他几种效果,上图使用了ball color = white,下图使用了axis方案设置left color=gray, right color=white。正如@cfr 所说,反射效果依赖于光,这意味着要正确绘制它们,必须处理光源,而不是由 Ti 完成。Z,我们能做的最好的事情就是尝试用阴影来模拟这些效果……

如需了解更多可能的影响,请查看手册在“库”>“阴影”下

具有轴线效应

完整的 MWE:

\documentclass[tikz, border=2mm]{standalone}
\usepackage{tikz-3dplot}
\usetikzlibrary{calc,shadings}
\begin{document}
\pgfmathsetmacro{\x}{5}
\pgfmathsetmacro{\y}{-60}
\tdplotsetmaincoords{\x}{\y}
\newcommand*{\gridstep}{0.15}
\begin{tikzpicture}[tdplot_main_coords]
\filldraw[fill=white,looseness=1] (3.6,0,-21) coordinate (under surface right) to[bend right] (1.7,3.2,-13) coordinate (under surface left) -- coordinate (middle left) (1.8,3.5,-12) coordinate (bottom left) to[bend left] (4,0,-22) coordinate (bottom right) -- coordinate (middle right) cycle;
\shade[left color=gray, right color=white, draw]% << change shading effects here
(4,0,-22) to[bend right] (1.8,3.5,-12) -- (1.8,3.5,30) coordinate (top left) to[bend left] (4,0,20) coordinate (top right) -- cycle;

\foreach[count=\ii] \i in {0,\gridstep,...,1}{
        \path (bottom left) to[bend left] coordinate[pos=\i](p\ii) (bottom right);
        \path (under surface left) to[bend left] coordinate[pos=\i](k\ii) (under surface right);
        \draw (p\ii) -- ++(0,0,42);
        \draw (p\ii) -- (k\ii);
        \draw ($(bottom left)!\i!(top left)$) to[bend left] ($(bottom right)!\i!(top right)$);
        };
\draw (middle left) to[bend left] (middle right);
\end{tikzpicture}
\end{document}

相关内容