How to make a 2D sphere with decreasing radial gradient
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm using this code:
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color = gray!60] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
which creates:
How to apply decreasing radial gradient?
The intended result would be something like (with the axes, etc remaining visible):
tikz-pgf tikz-3dplot
add a comment |Â
up vote
2
down vote
favorite
I'm using this code:
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color = gray!60] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
which creates:
How to apply decreasing radial gradient?
The intended result would be something like (with the axes, etc remaining visible):
tikz-pgf tikz-3dplot
Do you want the axes also to "fade away" or only the sphere?
â marmot
3 hours ago
Only the sphere.
â Ziezi
3 hours ago
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm using this code:
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color = gray!60] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
which creates:
How to apply decreasing radial gradient?
The intended result would be something like (with the axes, etc remaining visible):
tikz-pgf tikz-3dplot
I'm using this code:
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color = gray!60] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
which creates:
How to apply decreasing radial gradient?
The intended result would be something like (with the axes, etc remaining visible):
tikz-pgf tikz-3dplot
tikz-pgf tikz-3dplot
edited 3 hours ago
asked 4 hours ago
Ziezi
235312
235312
Do you want the axes also to "fade away" or only the sphere?
â marmot
3 hours ago
Only the sphere.
â Ziezi
3 hours ago
add a comment |Â
Do you want the axes also to "fade away" or only the sphere?
â marmot
3 hours ago
Only the sphere.
â Ziezi
3 hours ago
Do you want the axes also to "fade away" or only the sphere?
â marmot
3 hours ago
Do you want the axes also to "fade away" or only the sphere?
â marmot
3 hours ago
Only the sphere.
â Ziezi
3 hours ago
Only the sphere.
â Ziezi
3 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
If you want only a radial fading, then the example just before section 23.4.2 may be the way to go.
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
fill[tdplot_screen_coords,gray!40!black,%ball color = gray,
path fading=fade out] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
Another option is to slightly slightly modify the fuzzy circles from the shadings
library. (I merely copied and slightly modified the fuzzy circle fading from the library to give you immediate access to the transparency levels at different distances. I am not claiming that my choice is particularly nice, but in the end you need to decide yourself what suits you best. The number 23 does not really represent a percentage, but if you play basketball you may understand why I picked it. ;-)
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
makeatletter
pgfdeclareradialshadingtikz@lib@fade@circle@23pgfpointorigin
color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!50);
color(25bp)=(pgftransparent!92); color(50bp)=(pgftransparent!100)
pgfdeclarefadingcircle with fuzzy edge 23 percentpgfuseshadingtikz@lib@fade@circle@23
makeatother
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color=gray!60,
path fading=circle with fuzzy edge 23 percent] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
add a comment |Â
up vote
1
down vote
replace the shade line with
`node[circle,shading=radial,outer color=gray!30,inner color=black!80, minimum width=14.5cm];
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
If you want only a radial fading, then the example just before section 23.4.2 may be the way to go.
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
fill[tdplot_screen_coords,gray!40!black,%ball color = gray,
path fading=fade out] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
Another option is to slightly slightly modify the fuzzy circles from the shadings
library. (I merely copied and slightly modified the fuzzy circle fading from the library to give you immediate access to the transparency levels at different distances. I am not claiming that my choice is particularly nice, but in the end you need to decide yourself what suits you best. The number 23 does not really represent a percentage, but if you play basketball you may understand why I picked it. ;-)
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
makeatletter
pgfdeclareradialshadingtikz@lib@fade@circle@23pgfpointorigin
color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!50);
color(25bp)=(pgftransparent!92); color(50bp)=(pgftransparent!100)
pgfdeclarefadingcircle with fuzzy edge 23 percentpgfuseshadingtikz@lib@fade@circle@23
makeatother
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color=gray!60,
path fading=circle with fuzzy edge 23 percent] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
add a comment |Â
up vote
3
down vote
If you want only a radial fading, then the example just before section 23.4.2 may be the way to go.
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
fill[tdplot_screen_coords,gray!40!black,%ball color = gray,
path fading=fade out] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
Another option is to slightly slightly modify the fuzzy circles from the shadings
library. (I merely copied and slightly modified the fuzzy circle fading from the library to give you immediate access to the transparency levels at different distances. I am not claiming that my choice is particularly nice, but in the end you need to decide yourself what suits you best. The number 23 does not really represent a percentage, but if you play basketball you may understand why I picked it. ;-)
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
makeatletter
pgfdeclareradialshadingtikz@lib@fade@circle@23pgfpointorigin
color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!50);
color(25bp)=(pgftransparent!92); color(50bp)=(pgftransparent!100)
pgfdeclarefadingcircle with fuzzy edge 23 percentpgfuseshadingtikz@lib@fade@circle@23
makeatother
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color=gray!60,
path fading=circle with fuzzy edge 23 percent] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
add a comment |Â
up vote
3
down vote
up vote
3
down vote
If you want only a radial fading, then the example just before section 23.4.2 may be the way to go.
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
fill[tdplot_screen_coords,gray!40!black,%ball color = gray,
path fading=fade out] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
Another option is to slightly slightly modify the fuzzy circles from the shadings
library. (I merely copied and slightly modified the fuzzy circle fading from the library to give you immediate access to the transparency levels at different distances. I am not claiming that my choice is particularly nice, but in the end you need to decide yourself what suits you best. The number 23 does not really represent a percentage, but if you play basketball you may understand why I picked it. ;-)
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
makeatletter
pgfdeclareradialshadingtikz@lib@fade@circle@23pgfpointorigin
color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!50);
color(25bp)=(pgftransparent!92); color(50bp)=(pgftransparent!100)
pgfdeclarefadingcircle with fuzzy edge 23 percentpgfuseshadingtikz@lib@fade@circle@23
makeatother
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color=gray!60,
path fading=circle with fuzzy edge 23 percent] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
If you want only a radial fading, then the example just before section 23.4.2 may be the way to go.
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
fill[tdplot_screen_coords,gray!40!black,%ball color = gray,
path fading=fade out] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
Another option is to slightly slightly modify the fuzzy circles from the shadings
library. (I merely copied and slightly modified the fuzzy circle fading from the library to give you immediate access to the transparency levels at different distances. I am not claiming that my choice is particularly nice, but in the end you need to decide yourself what suits you best. The number 23 does not really represent a percentage, but if you play basketball you may understand why I picked it. ;-)
documentclass[a4paper]article
usepackagetikz
usepackagetikz-3dplot
usetikzlibraryfadings
makeatletter
pgfdeclareradialshadingtikz@lib@fade@circle@23pgfpointorigin
color(0pt)=(pgftransparent!0); color(20bp)=(pgftransparent!50);
color(25bp)=(pgftransparent!92); color(50bp)=(pgftransparent!100)
pgfdeclarefadingcircle with fuzzy edge 23 percentpgfuseshadingtikz@lib@fade@circle@23
makeatother
tikzfading[name=fade out,
inner color=transparent!0,
outer color=transparent!100]
begindocument
tdplotsetmaincoords45135
pgfmathsetmacrorvec.8
pgfmathsetmacrothetavec45
pgfmathsetmacrophivec75
begintikzpicture[scale=9,tdplot_main_coords]
shade[tdplot_screen_coords,ball color=gray!60,
path fading=circle with fuzzy edge 23 percent] (0,0) circle (rvec);
coordinate (O) at (0,0,0);
tdplotsetcoordPrvecthetavecphivec
draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]$x$;
draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]$y$;
draw[thick,->] (0,0,-1) -- (0,0,1) node[anchor=south]$z$;
draw[-stealth,color=black] (O) -- (P) node[midway,above] $r$;
draw[dashed, color=red] (O) -- (Pxy);
draw[dashed, color=red] (P) -- (Pxy);
tdplotdrawarc(O)0.20phivecanchor=north$phi$
tdplotsetthetaplanecoordsphivec
tdplotdrawarc[tdplot_rotated_coords](0,0,0)0.5thetavec90anchor=south west$theta$
tdplotdrawarc[tdplot_rotated_coords](0,0,0)rvec-180180anchor=south west
endtikzpicture
enddocument
edited 2 hours ago
answered 3 hours ago
marmot
60.2k464131
60.2k464131
add a comment |Â
add a comment |Â
up vote
1
down vote
replace the shade line with
`node[circle,shading=radial,outer color=gray!30,inner color=black!80, minimum width=14.5cm];
add a comment |Â
up vote
1
down vote
replace the shade line with
`node[circle,shading=radial,outer color=gray!30,inner color=black!80, minimum width=14.5cm];
add a comment |Â
up vote
1
down vote
up vote
1
down vote
replace the shade line with
`node[circle,shading=radial,outer color=gray!30,inner color=black!80, minimum width=14.5cm];
replace the shade line with
`node[circle,shading=radial,outer color=gray!30,inner color=black!80, minimum width=14.5cm];
edited 3 hours ago
answered 3 hours ago
KJO
1608
1608
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452523%2fhow-to-make-a-2d-sphere-with-decreasing-radial-gradient%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Do you want the axes also to "fade away" or only the sphere?
â marmot
3 hours ago
Only the sphere.
â Ziezi
3 hours ago