当前位置: 首页 > news >正文

广东备案网站系统开发外包

广东备案网站,系统开发外包,网站建设怎么开发客户,网络营销专业的就业方向原创:daode1212(daode3056) 本文定义不完全对称的图像叫亚对称图像,因为全对称的太过机械,不符合人工的特点,本人基于二元高次的有理式,生成时引入N个随机数分A,B两个组,再通过指针对画布所有像素高速扫描生…

原创:daode1212(daode3056)

        本文定义不完全对称的图像叫亚对称图像,因为全对称的太过机械,不符合人工的特点,本人基于二元高次的有理式,生成时引入N个随机数分A,B两个组,再通过指针对画布所有像素高速扫描生成三个类别的图像。这些奇异的图像、图案可广泛应用于纺织、工艺、陶瓷、铁艺、瓷砖等行业的图像自动生成,也为AI自动生成图像添加了新元素、新算法,截图如下:

C# 源代码如下:

// Asymmetric solution space (RGB, black and white, root curve).n344:
// By Daode3056, 2024-12-24
unsafe void button344_Click(object sender, EventArgs e)
{int ordeNum = 6; // The highest power of the polynomialint K = 40; // Refinement coefficientint width = 16 * K, height = 16 * K;Bitmap img = new Bitmap(width, height);float dlt = 1f / K; // Differential stepvar RD = new Random();string pStr = "";// Generate random arrays: ===================================  double[] A = new double[ordeNum]; double[] B = new double[ordeNum];for (int i = 0; i < ordeNum; i++){A[i] = 21 * RD.NextDouble();pStr += string.Format("{0:0.00}", A[i]) + "|";}pStr += "\r\n";for (int i = 0; i < ordeNum; i++){B[i] = 21 * RD.NextDouble();pStr += string.Format("{0:0.00}", B[i]) + "|";}// Define bitmap data, pointer object: =====================================BitmapData data = img.LockBits(new Rectangle(0, 0, width, height),ImageLockMode.ReadWrite,System.Drawing.Imaging.PixelFormat.Format24bppRgb);var ptr = (byte*)data.Scan0.ToPointer();// Binary high-order polynomial calculation function: =====================================Func<double, double, double> ploy = (double x, double y) =>{double xx = x * x; double yy = y * y;double fx = 1; double fy = 1;double retV = 0;//for (int i = 0; i < ordeNum; i++)//{//    fx *= (xx - A[i])*(y - A[i])/(x - A[i]);//    fy *= (yy - B[i])*(y - B[i])/(x - B[i]);//}for (int i = 0; i < ordeNum; i++){fx *= (y - A[i]) * (x - B[i]) * (xx - A[i]);fy *= (y - B[i]) * (x - A[i]) * (yy - B[i]);}if (fx != 0 && fy != 0){retV = x * fy / fx - y * y * fx / fy;}return Math.Abs(retV);};// Pointer operation, generate bitmap: ========================int idx = RD.Next(3);for (int i = 0; i < data.Height - 60; i++){for (int j = 0; j < data.Width; j++){float x = (i - width / 2 + 30) / (float)K;float y = (j - height / 2) / (float)K;//====================double z0 = Math.Log(ploy(x, y));if (idx == 0){// RGB image:if (z0 < 3){ptr[i * data.Stride + j * 3] = (byte)(127 - 127 * Math.Cos(z0 / 1.23));ptr[i * data.Stride + j * 3 + 1] = (byte)(127 + 127 * Math.Cos(z0 / 2.19));ptr[i * data.Stride + j * 3 + 2] = (byte)(127 + 127 * Math.Cos(z0 / 3.31));}}if (idx == 1){// Black and white image:if (z0 < 5){ptr[i * data.Stride + j * 3] = (byte)(127 + 127 * Math.Cos(z0) > 127 ? 255 : 0);ptr[i * data.Stride + j * 3 + 1] = (byte)(127 + 127 * Math.Cos(z0) > 127 ? 255 : 0);ptr[i * data.Stride + j * 3 + 2] = (byte)(127 + 127 * Math.Cos(z0) > 127 ? 255 : 0);}}if (idx == 2){// Equation root finding: ====================double z1 = ploy(x - dlt, y);double z2 = ploy(x + dlt, y);double z3 = ploy(x, y - dlt);double z4 = ploy(x, y + dlt);//=========================if (z1 * z2 < 100 || z3 * z4 < 100){ptr[i * data.Stride + j * 3] = (byte)(127 - 127 * Math.Cos(z0 / 137) > 127 ? 255 : 0);ptr[i * data.Stride + j * 3 + 1] = (byte)(127 - 127 * Math.Cos(z0 / 137) > 127 ? 255 : 0);ptr[i * data.Stride + j * 3 + 2] = (byte)(127 - 127 * Math.Cos(z0 / 137) > 127 ? 255 : 0);}else{ptr[i * data.Stride + j * 3] = (byte)255;ptr[i * data.Stride + j * 3 + 1] = (byte)255;ptr[i * data.Stride + j * 3 + 2] = (byte)255;}}}}img.UnlockBits(data);// Bitmap drawing tool:Graphics gs = Graphics.FromImage(img);Pen pen0 = new Pen(Color.FromArgb(0, 0, 60), 2);Brush bh = new SolidBrush(Color.White);gs.DrawString("["+idx+"]"+pStr, new Font("SimHei", 11), bh, 15 * K - pStr.Length * 5, height - 50);pictureBox1.Image = img;img.Save("button34_"+ string.Format("{0:X}",RD.Next(0xFFFFFF)) +".png");
}

http://www.sczhlp.com/news/85462/

相关文章:

  • 企业培训网站模板高端网页设计公司
  • 如何做网站推广广告做搜狗网站优化首页
  • 南京做企业网站的公司建设公司企业logo
  • 浏览网站模板天津百度代运营
  • 公司网站如何被百度快照黑马程序员培训价格表
  • 网站做支付接口吗专做宠物的网站
  • 电子商务网站的设计要素青岛商家都上什么网站
  • 检察院门户网站建设自查自纠报告WordPress 打赏插件
  • 创建网站如何注册潍坊推广平台
  • 义乌公司网站制作教你做吃的网站
  • 载带 东莞网站建设有哪些网站可以免费看
  • 模板网站的建设手机网站翻页效果
  • 建设银行网站无法转账做哪方面的网站好呢
  • 做集团网站的商业网站源码免费下载
  • 做后台财务系统网站专业网站制作全包
  • 网站的运营推广方案wordpress添加分类目录
  • 网站上的淘客组件是怎样做的808影院网
  • html网页建设网站代码ui设计主要做什么工作
  • 湖南佳邦建设有限公司网站wordpress的不好
  • 佛山网站建设公司价格网页设计教程23
  • 资讯网站的优势开发平台官网
  • 深圳找网站建设视频网站会员系统怎么做
  • 怎么修复网站死链个人域名备案需要哪些资料
  • 平度做网站推广企业建立企业网站有哪些优势?
  • 网站建设新模式2345浏览器网址大全
  • 嘉定网站设计怎么样企业网站建公司
  • 中文网站模板免费下载电子商务网站建设是什么
  • 仿门户网站源码玉溪住房和城乡建设局网站
  • 惠州网站制作定制ui设计网课一般多少钱
  • 长沙网站建设icp备wordpress vs