91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.88MB
    文件類(lèi)型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-10-31
  • 語(yǔ)言: 其他
  • 標(biāo)簽:

資源簡(jiǎn)介

呵呵 我和同學(xué)一起做的~

資源截圖

代碼片段和文件信息

#include
#include
#include
#define?A?0.5236????//設(shè)定theta角度為30度
#define?D?0.005?????//每個(gè)小格的邊長(zhǎng)
#define?PI?3.1415926
class?Ellipse
{
int?number;
float?centerX;????????????
float?centerY;
float?longaxes;
float?shortaxes;
int?angle;
float?coefficient;????????????//?定義橢圓的中心、長(zhǎng)軸、短軸、角度、折射系數(shù)
public:
int?Getnumber() {?return?number;}
float?GetcenterX()?{?return?centerX;}
float?GetcenterY()?{?return?centerY;}
float?Getshortaxes()?{?return?shortaxes;}
float?Getlongaxes()?{?return?longaxes;}
int?Getangle()?{?return?angle*PI/180;}
float?Getcoefficient()?{?return?coefficient;}???
void?GetProjection(float?*pB);
????Ellipse(int?Numberfloat?CenterXfloat?CenterY?float?Longaxesfloat?Shortaxesint?Anglefloat?Coefficient)
{??
number=NumbercenterX=CenterXcenterY=CenterYlongaxes=Longaxes
shortaxes=Shortaxesangle=Anglecoefficient=Coefficient;
}???????????????????????????????????//定義一個(gè)橢圓的構(gòu)造函數(shù)

};
void??Ellipse::GetProjection(float?*pB)???????//調(diào)用構(gòu)造函數(shù)
{???int????e=400;??????????????????//圖像大小
float??pi2RhC1;??????????????//采樣的角度
????float?*jj=new?float[400];?????????//分配卷積結(jié)果值空間
????float?N=?Getnumber();
float?X=GetcenterX();???????????????//得到中心的X坐標(biāo)
float?Y=GetcenterY();???????????????//得到中心的Y坐標(biāo)
float?BB=Getshortaxes();????????????//得到短軸
float?AA=Getlongaxes();?????????????//得到長(zhǎng)軸
float?AG=Getangle();??????????????????//得到旋轉(zhuǎn)角度
float?C=Getcoefficient();???????????//得到折射系數(shù)??????????????
float*ft=new?float[400];????????????//分配投影函數(shù)數(shù)值空間

?????for(int?k=0;k<=e;k++)??????????//獲得投影函數(shù)值
{
float?gt=2*C*AA*BB*fabs(pow(AA2)*pow(cos(A-AG)2)
????+pow(BB2)*pow(sin(A-AG)2)-pow((k-X*cos(A)-Y*
????sin(A))2))/pow(AA2)*pow(cos(A-AG)2)+pow(BB2)*
??????? pow(sin(A-AG)2);?
????ft[k]=gt;?
}

?? ???pi2=?pow(PI2);?????????????????//求PI的平方

for(int?i=0j=-200;j<=200;i++j++)?//卷積函數(shù)的分類(lèi)離散形式與投影值相乘
{
if(j%2==0)???jj[i]=0;

else?if(j==0)????jj[i]=10000*ft[i];?????????//計(jì)算1/(4*D*D)得10000

else???jj[i]=-1/(j*j*PI*PI*D*D)*ft[i];
}

for(int?n=0;n<400;n++)????????//反投影過(guò)程得像素值
{??
for(int?j=0;j<400;j++)
{
C1=e/2-(e-1)*(cos(A)+sin(A))/2;//定義C1為此值?
????????????????Rh=n*D*cos(A)+j*D*sin(A)+C1*D;?//R軸上的垂足坐標(biāo)
int?I=Rh;//求Rh的整數(shù)部分
????float?F=Rh-I;//得出小數(shù)部分
float?X1Y1TPQ;
??????????????????????X1=(n+1-(e+1)/2)*D-X;?????//新坐標(biāo)的大小
??????Y1=(j+1-(e+1)/2)*D-Y;
??P=AA*AA;?Q=BB*BB;
??????T=pow(X12)/P+pow(Y12)/Q;?????
if(T>1)???pB[n+j*e]=0;????????????//判斷坐標(biāo)是否在橢圓內(nèi),不在時(shí)像素值歸零
else pB[n+j*e]=(1-F)*jj[I]+F*jj[I+1];//坐標(biāo)在橢圓的像素值大小
?
}
}

}
void?main()???????????????????????????//主函數(shù)
{???
float?*pB=new?float[160000];??????//保存反投影數(shù)據(jù)
????float?*pC=new?float[160000];
for(int?i=0;i<160000;i++)
{
pC[i]=0;
}

Ellipse?Ellipse1(1000.920.69902);
Ellipse?Ellipse2(20-0.01840.8740.662490-0.98);
Ellipse?Ellipse3(300.220.310.1172-0.02);
Ellipse?Ellipse4(40-0.220.410

?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----

?????文件????1214814??2007-12-19?19:52??圖象.bmp

?????文件????????119??2007-12-19?19:58??說(shuō)明.txt

?????文件???????5056??2007-12-19?19:56??卷積.cpp

?????目錄??????????0??2007-06-06?13:31??繪圖

?????文件??????27004??2005-11-24?11:32??繪圖\11.aps

?????文件???????1701??2005-11-24?11:46??繪圖\11.clw

?????文件???????4165??2004-09-21?19:56??繪圖\11.cpp

?????文件???????4471??2004-09-21?19:56??繪圖\11.dsp

?????文件????????527??2004-09-21?19:56??繪圖\11.dsw

?????文件???????1322??2004-09-21?19:56??繪圖\11.h

?????文件??????91136??2005-11-24?11:46??繪圖\11.ncb

?????文件??????53760??2005-11-24?11:46??繪圖\11.opt

?????文件????????238??2004-09-21?19:56??繪圖\11.plg

?????文件??????10160??2004-09-21?19:56??繪圖\11.rc

?????文件???????1772??2004-09-21?19:56??繪圖\11Doc.cpp

?????文件???????1445??2004-09-21?19:56??繪圖\11Doc.h

?????文件???????2719??2004-09-21?19:56??繪圖\11View.cpp

?????文件???????1853??2004-09-21?19:56??繪圖\11View.h

?????目錄??????????0??2007-12-19?19:57??繪圖\Debug

?????文件?????597153??2007-12-19?19:57??繪圖\Debug\1.txt

?????文件?????118823??2004-09-21?19:56??繪圖\Debug\11.exe

?????文件?????315928??2004-09-21?19:56??繪圖\Debug\11.ilk

?????文件??????22672??2004-09-21?19:56??繪圖\Debug\11.obj

?????文件????5495540??2004-09-21?19:56??繪圖\Debug\11.pch

?????文件?????336896??2004-09-21?19:56??繪圖\Debug\11.pdb

?????文件???????5852??2004-09-21?19:56??繪圖\Debug\11.res

?????文件??????14515??2004-09-21?19:56??繪圖\Debug\11Doc.obj

?????文件??????20205??2004-09-21?19:56??繪圖\Debug\11View.obj

?????文件??????22873??2004-09-21?19:56??繪圖\Debug\MainFrm.obj

?????文件?????105373??2004-09-21?19:56??繪圖\Debug\StdAfx.obj

............此處省略16個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源