Hot answers tagged

3

The intersection of the surface with the x-z plane can be parametrized with the hyperbolic functions. Why? The surface in real coordinates can be parametrized by (x,1+x*x-z*z,z). Now we need to solve z*z-x*x=1 in order to have the second component 0, so an obvious choice is z=cosh(t) and x=sinh(t). In principle, you can parametrize the full thing with cosh ...


2

\value is not what you want. It works on counters, which your expression does not contain. To perform the required integer math, use \numexpr...\relax. Please see comments below for additional warnings/disclaimers. \documentclass[border=3pt,tikz]{standalone} \let\oldvec\vec \usepackage{amsmath} % for \text \usepackage{tikz} \usepackage{comment} \tikzset{&...


2

There are two issues. The first one is that by default the plot variable is \x, which clashes with \x1 from calc. To solve this one, you can just use variable=\t, say, for the plot. The second issue is that for \coordinate (centre) at (4,1,0); after let \p1=(centre) in the macro \x1 does not evaluate to 4but to the x coordinate of the projection of (...


2

As explained in the section Defining Cycle Lists based on Color Maps that starts on p. 220 of the pgfplots manual v1.17, you can create a cycle list based on a colormap. I added something that interpolates between blue and cyan, but you can change this, of course. And you can add the legend entries with \addlegendentryexpanded. \documentclass[tikz,border=...


1

Along the lines of my answer Plotting a 3d surface in tikz, with a limit to the infinity, I combine a computer algebra system, SAGE with LaTeX by way of the sagetex package. First, it helps to know what the plot will look like. Go to a Sage Cell Server and typing in the following lines: var('y') plot3d(x^3/y^2,(x,-2,2),(y,-2,2)) followed by enter and ...


1

With R instead of gnuplot: \documentclass{article} \begin{document} <<echo=F,dev="tikz",message=FALSE>>= s <- function (x, y) {return (x^3/y^2)} x <- seq(-1, 1, length= 30) y <- x z <- outer(x, y, s) library(lattice) library(gridExtra) trellis.par.set("axis.line", list(col=NA,lty=1,lwd=1)) wireframe(z, drape=T, shade=T, xlab="x", ...


Only top voted, non community-wiki answers of a minimum length are eligible