File:Demipenteract_graph_ortho.svg
From Wikipedia, the free encyclopedia
![File:Demipenteract graph ortho.svg](http://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Demipenteract_graph_ortho.svg/600px-Demipenteract_graph_ortho.svg.png)
Size of this PNG preview of this SVG file: 600 × 600 pixels. Other resolutions: 240 × 240 pixels | 480 × 480 pixels | 768 × 768 pixels | 1,024 × 1,024 pixels | 2,048 × 2,048 pixels.
Original file (SVG file, nominally 800 × 800 pixels, file size: 805 bytes)
![]() | This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionDemipenteract graph ortho.svg |
English: Othographic projection of Demipenteract (edge gragh) |
Date | |
Source | Own work |
Author | Claudio Rocchini |
Source Code
static int nbit( int x ) {
int n = 0;
while(x) { if(x&1) ++n; x >>= 1; }
return n;
}
void main() {
const int D = 5; const int NV = 16; const int NE = 80;
double v[NV][D]; int e[NE][2];
double px[NV]; double py[NV];
// Magic numbers
const double x1 = -.1464466094; const double y1 = .3535533906;
const double x2 = -.1464466094; const double y2 = -.3535533906;
const double x3 = -.3535533906; const double y3 = .1464466094;
const double y4 = -.1464466094; const double x4 = -.3535533906;
const double x5 = 0; const double y5 = 0;
const double PX[D] = {x1,x2,x3,x4,x5};
const double PY[D] = {y1,y2,y3,y4,y5};
int i,j,k,l;
for(k=0,i=0;i<(1<<D);++i) if(nbit(i)%2==0){
for(j=0;j<D;++j) v[k][j] = (i>>j)&1 ? 1.0 : -1.0;
++k;
}
assert(k==NV);
for(k=0,i=0;i<NV-1;++i) for(j=i+1;j<NV;++j) {
double d = 0;
for(l=0;l<D;++l) { double t = v[i][l]-v[j][l]; d += t*t; }
if(d==8) { e[k][0]=i; e[k][1]=j; ++k; }
}
for(i=0;i<NV;++i){
px[i] = 0; for(l=0;l<D;++l) px[i] += v[i][l]*PX[l];
py[i] = 0; for(l=0;l<D;++l) py[i] += v[i][l]*PY[l];
}
const double SX = 800; const double SY = 800;
const double B = 64; const double R = 12;
const double sca = std::min((SX-2*B)/2,(SY-2*B)/2);
for(i=0;i<NV;++i) { px[i] = B+(px[i]+1)*sca; py[i] = B+(py[i]+1)*sca; }
FILE * fp = fopen("c:\\temp\\Demipenteract_Graph2.svg","w");
fprintf(fp,
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
"<svg\n"
"xmlns:svg=\"http://www.w3.org/2000/svg\"\n"
"xmlns=\"http://www.w3.org/2000/svg\"\n"
"version=\"1.0\"\n"
"width=\"%g\"\n" "height=\"%g\"\n"
"id=\"Demipenteract_Graph2\">\n"
,SX,SY
);
fprintf(fp,"<g style=\"stroke:#000000;stroke-width:3;stroke-opacity:1.0;\">\n");
for(i=0;i<NE;++i)
fprintf(fp,
"<line x1=\"%5.1lf\" y1=\"%5.1lf\" x2=\"%5.1lf\" y2=\"%5.1lf\"/>\n"
,px[e[i][0]],py[e[i][0]], px[e[i][1]],py[e[i][1]]
);
fprintf(fp,"</g>\n");
fprintf(fp,"<g style=\"stroke:#000000;stroke-width:2;fill:#0000E0\">\n");
for(i=0;i<NV;++i)
fprintf(fp,"<circle cx=\"%5.1lf\" cy=\"%5.1lf\" r=\"%5.1lf\"/>\n",px[i],py[i],R);
fprintf(fp,"</g>\n");
fprintf(fp,"</svg>\n");
fclose(fp);
}
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
![]() |
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
You may select the license of your choice.
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
some value
28 July 2008
image/svg+xml
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 03:17, 11 October 2021 | ![]() | 800 × 800 (805 bytes) | Andreasl01 | Simplified code |
21:34, 12 September 2008 | ![]() | 800 × 800 (5 KB) | Tomruen | try red dots | |
11:40, 28 July 2008 | ![]() | 800 × 800 (5 KB) | Rocchini | {{Information |Description={{en|1=Othographic projection of Demipenteract (edge gragh)}} |Source=Opera creata dall'uploader (own work by uploader) |Author=Claudio Rocchini |Date=2008-07-28 |Permission= |other_versions= }} {{ImageUpload| |
File usage
The following pages on the English Wikipedia use this file (pages on other projects are not listed):
- 10-demicube
- 1 22 polytope
- 1 32 polytope
- 1 33 honeycomb
- 1 42 polytope
- 1 52 honeycomb
- 2 21 polytope
- 3 21 polytope
- 4 21 polytope
- 5-cell
- 5-demicube
- 5 21 honeycomb
- 6-demicube
- 7-demicube
- 8-demicube
- 9-demicube
- E9 honeycomb
- Quarter 5-cubic honeycomb
- Quarter hypercubic honeycomb
- Rectified 5-cell
- Triangular prism
- Uniform k 21 polytope
- User:Mateuszica/Dimensions
- User:Rocchini
- User:Tomruen/5-demicube
- User:Tomruen/Disphenoid
- User:Tomruen/demihypercube graphs
- Template:1 k2 polytopes
- Template:K 21 polytopes
Global file usage
The following other wikis use this file:
- Usage on bg.wikipedia.org
- Usage on en.wikiversity.org
- Usage on eo.wikipedia.org
- Usage on ro.wikipedia.org
- Usage on ru.wikipedia.org
- Usage on simple.wikipedia.org
- Usage on uk.wikipedia.org
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Width | 800 |
---|---|
Height | 800 |
Retrieved from "https://en.wikipedia.org/wiki/File:Demipenteract_graph_ortho.svg"