File:Body centered cubic 35 balls.svg
Original file (SVG file, nominally 360 × 320 pixels, file size: 5 KB)
Captions
Summary edit
DescriptionBody centered cubic 35 balls.svg |
English: 35 balls forming eight unit cells of the body-centered cubic lattice |
Date | |
Source | Own work |
Author | David Eppstein |
Licensing edit
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.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Source code edit
This image was created as an SVG file by the following source code:
from PADS import SVG
from math import sqrt,tan,asin
import sys
layers = 2
n = layers**3 + (layers + 1)**3
def ccube(x,y,z):
return (x & 1) == (y & 1)
dims = range(-layers,layers+1)
rdims = range(layers,-layers-1,-1)
points = [(x,y,z) for x in rdims for y in dims for z in dims
if x&1 == y&1 == z&1]
pov = (-20,-3.7,6.5)
x,y,z = 2,1,0
radius = 0.65
scale = 1000.0
def distance(p,q):
return sqrt(sum([(p[i]-q[i])**2 for i in (x,y,z)]))
def perspective(loc):
dz = loc[z]-pov[z]
return (loc[x]-pov[x])*scale/dz, (loc[y]-pov[y])*scale/dz
bbox = 360+320j
output = SVG.SVG(bbox,sys.stdout)
output.element("defs",1)
output.element('radialGradient id = "light" cx = "50%" cy = "50%" fx = "70%" fy = "15%" r = "55%"',1)
output.element('stop stop-color = "rgb(255,255,255)" offset = "0%"')
output.element('stop stop-color = "rgb(200,200,240)" offset = "15%"')
output.element('stop stop-color = "rgb(0,0,180)" offset = "100%"')
output.element("radialGradient",-1)
output.element("defs",-1)
def vertex(p):
lx,ly = perspective(p)
lx += 520
ly -= 40
prad = scale*1.1*tan(asin(radius/(distance(p,pov))))
output.circle(lx+ly*1j,prad,fill=SVG.colors.blue)
output.circle(lx+ly*1j,prad,fill="url(#light)")
for p in points:
vertex(p)
output.close()
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 01:52, 5 December 2013 | 360 × 320 (5 KB) | David Eppstein (talk | contribs) | Illustrator and Wikipedia disagree on what fy= means for radialGradients | |
01:51, 5 December 2013 | 360 × 320 (5 KB) | David Eppstein (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
- Usage on fr.wikipedia.org
- Usage on hu.wikipedia.org
- Usage on no.wikipedia.org
- Usage on ro.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 360 |
---|---|
Height | 320 |