קובץ:Cpmj.png
תוכן הדף אינו נתמך בשפות אחרות.
מראה
מתוך ויקיפדיה, האנציקלופדיה החופשית
גודל התצוגה המקדימה הזאת: 600 × 600 פיקסלים. רזולוציות אחרות: 240 × 240 פיקסלים | 480 × 480 פיקסלים | 1,000 × 1,000 פיקסלים.
לקובץ המקורי (1,000 × 1,000 פיקסלים, גודל הקובץ: 44 ק"ב, סוג MIME: image/png)
זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה. |
תוכן עניינים
תקציר
תיאורCpmj.png |
English: Potential of filled-in Julia set
Polski: Potencjał zbioru Julia |
תאריך יצירה | |
מקור | נוצר על־ידי מעלה היצירה |
יוצר | Adam majewski |
Long description
Method of drawing :
- escape time (function GiveLastIteration)
- potential (function jlogphi)
Code is formatted with Emacs
Compare with
-
Fat rabbit , components, C=-0.12565651+0.65720*i
-
c=-0,123+0.745i
-
c=-0.12256116687665 +0.74486176661974*i; (center of period 3 component) and external rays
-
C=-0.12256 +0.74486*i; eLCM/J
-
c=-0.11+0.65569999*i ; Twisted rabbit, MIIM
-
c=-0.11+0.65569999*i; mIIM/J
-
c = −0,123 + 0.745i; Quaternion julia set. The "Douady Rabbit" julia set is visible in the cross section
-
Douady rabbit in an exponential family
רישיון
אני, בעל זכויות היוצרים על היצירה הזאת, מפרסם אותה בזאת תחת הרישיונות הבאים:
הקובץ הזה מתפרסם לפי תנאי רישיון קריאייטיב קומונז ייחוס-שיתוף זהה 3.0 לא מותאם.
- הנכם רשאים:
- לשתף – להעתיק, להפיץ ולהעביר את העבודה
- לערבב בין עבודות – להתאים את העבודה
- תחת התנאים הבאים:
- ייחוס – יש לתת ייחוס הולם, לתת קישור לרישיון, ולציין אם נעשו שינויים. אפשר לעשות את זה בכל צורה סבירה, אבל לא בשום צורה שמשתמע ממנה שמעניק הרישיון תומך בך או בשימוש שלך.
- שיתוף זהה – אם תיצרו רמיקס, תשנו, או תבנו על החומר, חובה עליכם להפיץ את התרומות שלך לפי תנאי רישיון זהה או תואם למקור.
מוענקת בכך הרשות להעתיק, להפיץ או לשנות את המסמך הזה, לפי תנאי הרישיון לשימוש חופשי במסמכים של גנו, גרסה 1.2 או כל גרסה מאוחרת יותר שתפורסם על־ידי המוסד לתוכנה חופשית; ללא פרקים קבועים, ללא טקסט עטיפה קדמית וללא טקסט עטיפה אחורית. עותק של הרישיון כלול בפרק שכותרתו הרישיון לשימוש חופשי במסמכים של גנו.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
הנכם מוזמנים לבחור את הרישיון הרצוי בעיניכם.
C src code
See also:
/*
c console program
Adam Majewski
fraktal.republika.pl
1. draws for Fc(z)=z*z +c
-------------------------------
2. technic of creating ppm file is based on the code of Claudio Rocchini
http://en.wikipedia.org/wiki/Image:Color_complex_plot.jpg
create 8 bit color ( gray scale ) graphic file , portable pixmap file = PGM (P5)
see http://en.wikipedia.org/wiki/Portable_pixmap
to see the file use external application ( graphic viewer)
---------------------------------
http://fraktal.republika.pl/cpp_argphi.html
*/
#include <stdio.h>
// this function is based on cpp function
// in the file mandelXXsrc.zip .
// from program mandel by Wolf Jung
// http://www.mndynamics.com/indexp.html
int GiveLastIteration(double Zx, double Zy,double Cx ,double Cy , int iter_max, double bailout2)
{
// z= x+ y*i
long double x ,y ;
//
long double u, v;
int iter; // iteration
iter=0;//there was no iteration
y =Zy;
x =Zx;
u = x*x ;
v = y*y;
if ( u + v > bailout2 ) return iter; // point is in target set =no need to iterate
//
do
{
// Fc(z)= z*z +c
y = 2 * x * y + Cy;
x = u - v + Cx;
u = x*x;
v = y*y;
iter+=1;
}
while (( u + v <= bailout2 ) && iter<iter_max) ;
return iter;
}
/* this function is based on function by W Jung */
double jlogphi(double zx0, double zy0, double cx, double cy)
{
int j;
double
zx=zx0,
zy=zy0,
s = 0.5,
zx2=zx*zx,
zy2=zy*zy,
t;
//
for (j = 1; j < 400; j++)
{ s *= 0.5;
zy = 2 * zx * zy + cy;
zx = zx2 - zy2 + cx;
zx2 = zx*zx;
zy2 = zy*zy;
t = fabs(zx2 + zy2); // abs(z)
if ( t > 1e24) break;
}
return s*log2(t); // log(zn)* 2^(-n)
}//jlogphi
int main()
{
const double Cx=-0.12,Cy=0.665;
/* screen ( integer) coordinate */
int iX,iY;
const int iXmax = 1000, iXmin=0;
const int iYmax = 1000, iYmin=0;
int iWidth=iXmax-iXmin+1,
iHeight=iYmax-iYmin+1,
/* number of bytes = number of pixels of image * number of bytes of color */
iLength=iWidth*iHeight*1,/* 1 bytes of color */
index; /* of array */
/* world ( double) coordinate = parameter plane*/
const double length=2.0;
const double ZxMin=-length;
const double ZxMax=length;
const double ZyMin=-length;
const double ZyMax=length;
/* */
double PixelWidth=(ZxMax-ZxMin)/iXmax;
double PixelHeight=(ZyMax-ZyMin)/iYmax;
/* color component ( R or G or B) is coded from 0 to 255 */
/* it is 8 bit color RGB file */
const int MaxColorComponentValue=255;
FILE * fp;
char *filename="p__10.pgm";
char *comment="# Cx=-0.12, Cy=0.665; EscapeRadius=3 IterationMax=4000;";/* comment should start with # */
/* Z=Zx+Zy*i ; Z0 = 0 */
double Zx, Zy;
double Zx2, Zy2; /* Zx2=Zx*Zx; Zy2=Zy*Zy */
/* */
double potential,temp;
int Level, PreviousLevel;
int LastIteration;
const int IterationMax=4000;
/* bail-out value , radius of circle ; */
const double EscapeRadius=3;
double ER2=EscapeRadius*EscapeRadius;
/* dynamic 1D array for 8-bit color values */
unsigned char *array;
unsigned char color;
/*-------------------------------------------------------------------*/
array = malloc( iLength * sizeof(unsigned char) );
if (array == NULL)
{
fprintf(stderr,"Could not allocate memory");
getchar();
return 1;
}
else
{ fprintf(stderr,"I'm working. Please wait (:-))\n ");
/* fill the data array with white points */
for(index=0;index<iLength-1;++index) array[index]=255;
}
/* ---------------------------------------------------------------*/
for(iY=0;iY<iYmax;iY++)
{
for(iX=0;iX<iXmax;iX++)
{ /* compute Zx and Zy for each point */
Zy=ZyMin + iY*PixelHeight;
if (fabs(Zy)< PixelHeight/2) Zy=0.0; /* */
Zx=ZxMin + iX*PixelWidth;
//
LastIteration=GiveLastIteration(Zx, Zy, Cx , Cy , IterationMax, ER2);
if (LastIteration!=IterationMax)
/* */
{ potential=jlogphi(Zx, Zy,Cx,Cy);// GivePotential(Zx, Zy,Cx,Cy,ER2,IterationMax );
// printf(" potential= %f\n",potential);
temp=255*potential;
if (temp>255)
color=255;
else color= temp;
array[((iYmax-iY-1)*iXmax+iX)]= color ;
}
}
}
/* write the whole data array to ppm file in one step */
/*create new file,give it a name and open it in binary mode */
fp= fopen(filename,"wb"); /* b - binary mode */
if (fp == NULL){ fprintf(stderr,"file error"); }
else
{
/*write ASCII header to the file*/
fprintf(fp,"P5\n %s\n %d\n %d\n %d\n",comment,iXmax,iYmax,MaxColorComponentValue);
/*write image data bytes to the file*/
fwrite(array,iLength ,1,fp);
fclose(fp);
fprintf(stderr,"OK : file "); fprintf(stderr,filename); fprintf(stderr," saved.\nDone !!!");
getchar();
}
free(array);
getchar();
return 0;
}
פריטים שמוצגים בקובץ הזה
מוצג
ערך כלשהו ללא פריט ויקינתונים
24 באוקטובר 2009
image/png
45,334 בית
1,000 פיקסל
1,000 פיקסל
היסטוריית הקובץ
ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.
תאריך/שעה | תמונה ממוזערת | ממדים | משתמש | הערה | |
---|---|---|---|---|---|
נוכחית | 20:54, 3 באוגוסט 2023 | 1,000 × 1,000 (44 ק"ב) | Obscure2020 | Optimized with OxiPNG and ZopfliPNG. | |
18:46, 24 באוקטובר 2009 | 1,000 × 1,000 (70 ק"ב) | Soul windsurfer | {{Information |Description={{en|1=Potential of filled-in Julia set }} {{pl|1=Potencjał zbioru Julia}} |Source={{own}} |Author=Adam majewski |Date=24.10.2009 |Permission= |other_versions= }} |
שימוש בקובץ
אין בוויקיפדיה דפים המשתמשים בקובץ זה.
שימוש גלובלי בקובץ
אתרי הוויקי השונים הבאים משתמשים בקובץ זה:
- שימוש באתר ar.wikipedia.org
- שימוש באתר en.wikibooks.org
אוחזר מתוך "https://he.wikipedia.org/wiki/קובץ:Cpmj.png"