正在加载图片...
j[1]=y j[0]=s[0]+(p->dx-s[0])*(y-s[1])/(p->dy-s[1]+0.1) max=s[1l min=p->dy if (s[1]<p->dy)( max=p->dy min=s[1l if([1]>=min)&(j[1]<=max) i g=(struct node *)mallOc(LEN) g->dx=j[O] g->dy=j[1] if (hh==NULL) else r->next=q r-g if (p->dy<=y) i g=(struct node *)mallOc(LEN) g->dy=p->d if (hh==NULL) hh=q else r->next=q r-g r->next=NULL return (hh) main o int max, min struct node *head, r, *q int s[2] Initialize o head=creato q-he while(q-next! =NULL i putpixel(g->dx, g->dy, 14) g=q->next putpixel(q->dx,q->dy,14);/*左边界进行裁减*p=h; j[1]=y; j[0]=s[0]+(p->dx-s[0])*(y-s[1])/(p->dy-s[1]+0.1); max=s[1]; min=p->dy; if (s[1]<p->dy) { max=p->dy; min=s[1]; } if ((j[1]>=min)&&(j[1]<=max)) { q=(struct node *)malloc(LEN); q->dx=j[0]; q->dy=j[1]; if (hh==NULL) hh=q; else r->next=q; r=q; } if (p->dy<=y) { q=(struct node *)malloc(LEN); q->dx=p->dx; q->dy=p->dy; if (hh==NULL) hh=q; else r->next=q; r=q; } r->next=NULL; return(hh); } main() { int max,min; struct node *head,*r,*q; int i; int s[2]; Initialize(); head=creat(); q=head; while (q->next!=NULL) { putpixel(q->dx,q->dy,14); q=q->next; } putpixel(q->dx,q->dy,14); /*左边界进行裁减*/
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有