# File:Gaussian curvature.svg

Original file(SVG file, nominally 650 × 625 pixels, file size: 666 KB)

## Summary

 Description English: From left to right: a surface of negative Gaussian curvature (hyperboloid), a surface of zero Gaussian curvature (cylinder), and a surface of positive Gaussian curvature (sphere). Español: De izquierda a derecha: una superficie con curvatura gaussiana negativa (hiperboloide), una superficie con curvatura gaussiana cero (cilindro), y una superficie con curvatura gaussiana positiva (esfera). Date 9 January 2016 Source Own work Author Nicoguaro

## Creation

This file was created with Python, SciPy, NumPy and Matplotlib. It was later modified using Inkscape.

```from __future__ import division
import numpy as np
from numpy import pi, cos, sin, sqrt, outer, ones
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure(figsize=(10, 10))
u = np.linspace(0, 2 * pi, 100)
v = np.linspace(0, pi, 100)
one_v = ones(100)

# Sphere
x1 = 10 * outer(cos(u), sin(v))
y1 = 10 * outer(sin(u), sin(v)) + 17
z1 = 10 * outer(one_v, np.cos(v))
ax.plot_surface(x1, y1, z1, rstride=5, cstride=5, cmap='Spectral',
linewidth=0.5)

# Cylinder
x2 = 6 * outer(cos(u), one_v)
y2 = 6 * outer(sin(u), one_v)
z2 = 20 * outer(one_v, v/pi - 0.5)
ax.plot_surface(x2, y2, z2, rstride=5, cstride=5, cmap='Spectral',
linewidth=0.5)

# Hyperboloid
v = 2*v/pi - 1
x3 = 6 * outer(cos(u), sqrt(1 + v**2))
y3 = 6 * outer(sin(u), sqrt(1 + v**2)) - 16
z3 = 12 * outer(one_v, v)
ax.plot_surface(x3, y3, z3, rstride=5, cstride=5, cmap='Spectral',
linewidth=0.5)

# Fix aspect ratio and axes details
ax.set_xlim(-13, 13)
ax.set_ylim(-13, 13)
ax.set_zlim(-13, 13)
ax.view_init(elev=35, azim=-45)
plt.axis('off')
plt.savefig('Gaussian curvature.svg', transparent=True)
plt.show()
```

## Licensing

I, the copyright holder of this work, hereby publish it under the following license:  This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

## File history

The following pages on the English Wikipedia use this file (pages on other projects are not listed):

## Global file usage

The following other wikis use this file:

• Usage on ca.wikipedia.org
• Usage on de.wikipedia.org
• Usage on en.wikiversity.org
• Usage on en.wiktionary.org
• Usage on es.wikipedia.org
• Usage on eu.wikipedia.org
• Usage on fr.wikipedia.org
• Usage on he.wikipedia.org
• Usage on id.wikipedia.org
• Usage on ru.wikipedia.org