Python3 >>> print('\n'.join([''.join([('Love'[(x-y)%4]if((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3<=0 else' ')for x in range(-30,30)])for y in range(15,-15,-1)])) veLoveLov veLoveLov eLoveLoveLoveLove eLoveLoveLoveLove veLoveLoveLove
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>JS打造的跟随鼠标移动的酷炫拓图案</ti
一:规律 二维图形的展示都可以使用二维数组来解决,W图形x轴0,1,2,1,0,1,2.....在0到2直接来回的徘徊 y轴是在一直递增........ 二:代码 @Test /** * 测试打印w图案 */ public void testPrintW() { int[][] arr = new int[3][9]; // 初始化x,y int x = 2; int y = 0; boolean flag = false; for (int i = 1; i < 10; i++) { arr[