自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(22)
  • 资源 (3)
  • 收藏
  • 关注

原创 GH_Python生成六边形开孔曲面

import rhinoscriptsyntax as rsimport ghpythonlib.treehelpers as thdef find_midPt(pt1,pt2): pt1=rs.PointCoordinates(pt1) pt2=rs.PointCoordinates(pt2) mid=((pt1[0]+pt2[0])/2,(pt1[1]+pt2[1])/2, (pt1[2]+pt2[2])/2) return mid def create.

2021-07-22 13:57:40 742

原创 GH_Python中的数据结构转换

import rhinoscriptsyntax as rsimport ghpythonlib.treehelpers as th#将GH中的tree数据结构转为Python中的list结构y=th.tree_to_list(x,lambda x:x)print (y)print(y[0])#将Python中的list数据结构转为GH中的tree结构a=th.list_to_tree(y,source=[])...

2021-07-22 11:32:55 1278

原创 RhinoPython生成点干扰阵列放样曲面

#coding:utf-8import rhinoscriptsyntax as rsdef NormalSrf(Srf,intU,intV,attracts): Udomain=rs.SurfaceDomain(Srf,0) Vdomain=rs.SurfaceDomain(Srf,1) stepU=(Udomain[1]-Udomain[0])/intU stepV=(Udomain[1]-Udomain[0])/intV ptMtx={} n.

2021-07-21 15:39:42 595

原创 RhinoPython生成阵列放样曲面

#coding:utf-8import rhinoscriptsyntax as rsdef NormalSrf(Srf,intU,intV): Udomain=rs.SurfaceDomain(Srf,0) Vdomain=rs.SurfaceDomain(Srf,1) stepU=(Udomain[1]-Udomain[0])/intU stepV=(Udomain[1]-Udomain[0])/intV ptMtx={} normMtx={}.

2021-07-21 11:59:17 657

原创 RhinoPython寻找曲面法向量

#coding:utf-8import rhinoscriptsyntax as rsdef NormalSrf(Srf,intU,intV): Udomain=rs.SurfaceDomain(Srf,0) Vdomain=rs.SurfaceDomain(Srf,1) stepU=(Udomain[1]-Udomain[0])/intU stepV=(Udomain[1]-Udomain[0])/intV ptMtx={} for i in .

2021-07-20 22:57:09 713 1

原创 RhinoPython镂空曲面

#coding:utf-8import rhinoscriptsyntax as rsdef SrfPts(srf,intU,intV): ptDict={} #设定曲面的UV区间 Udomain=rs.SurfaceDomain(srf,0) Vdomain=rs.SurfaceDomain(srf,1) print "Udomain:",Udomain print "Vdomain:",Vdomain #设定曲面UV方向的步长 .

2021-07-19 22:44:52 450

原创 RhinoPython从UV两个方向评估曲面并生成点阵

#coding:utf-8import rhinoscriptsyntax as rsdef SrfPts(srf,intU,intV): ptDict={} #设定曲面的UV区间 Udomain=rs.SurfaceDomain(srf,0) Vdomain=rs.SurfaceDomain(srf,1) print "Udomain:",Udomain print "Vdomain:",Vdomain #设定曲面UV方向的步长 .

2021-07-15 15:50:36 831

原创 RhinoPython创建矩形开孔立面

#coding:utf-8import rhinoscriptsyntax as rsimport random as rnddef ptMtx(XMAX,YMAX,ZMAX): ptDict={} for i in range(XMAX): for j in range(YMAX): for k in range(ZMAX): x=i*8 y=j*10 .

2021-07-15 14:12:54 419

原创 RhinoPython之渐变圆筒排列

#coding:utf-8import rhinoscriptsyntax as rsimport random as rnddef ptMtx(XMAX,YMAX,ZMAX): ptDict={} ptList=[] for i in range(XMAX): for j in range(YMAX): for k in range(ZMAX): x=i*5 y=j*5.

2021-07-14 22:29:26 724

原创 RhinoPython创建三维点阵球体

这个案例练习会涉及物件着色、条件判定、循环语句和函数定义等内容。#coding:utf-8import rhinoscriptsyntax as rsimport random as rnddef ptMtx(XMAX,YMAX,ZMAX): ptDict={} ptList=[] for i in range(XMAX): for j in range(YMAX): for k in range(ZMAX): .

2021-07-14 20:55:03 574

原创 RhinoPython建立三维点阵

import rhinoscriptsyntax as rsdef ptMtx(XMAX,YMAX,ZMAX): ptDict={} ptList=[] for i in range(XMAX): for j in range(YMAX): for k in range(ZMAX): x=i*5 y=j*5 z=k*5 .

2021-07-12 22:42:01 923 1

原创 RhinoPython创建变形圆阵列

第一种方法如下:import rhinoscriptsyntax as rsptMtx={}imax=rs.GetInteger("input number in x direction",10)jmax=rs.GetInteger("input number in y direction",10)for i in range(imax): for j in range(jmax): x=i+i**2 y=j+j**2 z=0 .

2021-07-12 15:01:30 609

原创 GH插件Triceratops联动Three.js将三维物件在网页前端展示

之前接触过TT公司开发的DesignExplorer和Thread两种三维物件+二维分析图表在网页上展示的工具。http://tt-acm.github.io/DesignExplorer/https://thread.thorntontomasetti.com/welcome而上述两个工具的开发对我来说没看到具体的学习路径,不清楚是用什么开发的。此外,看到KPF 的ui团队开发了一个名为Scout的可视化工具,和上面的两个比较类似。Scout — KPF Urban I

2021-07-12 10:58:33 501 1

原创 RhinoPython学习记录:Dictionary字典类型运用

dictionary字典、tuple元组、list列表是常用的三种变量类型。其中dictionary与list相比,前者是通过key键寻找相对应的值(value),key-value键值对无固定的顺序,而list内的值则是有固定的顺序。newDict={}newDict["cat"]="taddy"newDict["dog"]="bobby"print (newDict["cat"])如这一段代码,先创建一个空的dictionary,然后进行赋值。而在查找值的时候,通过key进行查找。

2021-07-11 21:06:07 264

原创 RhinoPython绘制随机大小圆

首先绘制平面二维点阵,其后设定圆的大小随机半径,最后选定一个圆心与其他所有圆心连接直线。import rhinoscriptsyntax as rsimport randomimax=rs.GetInteger("input a number in x direction",10)jmax=rs.GetInteger("input a number in y direction",10)ptList=[]for i in range(imax): for j in range(.

2021-07-11 11:55:27 847 2

原创 将VScode与RhinoPython进行联动,更优雅地写代码!

需要地工具包括:RhinoRhino插件:Codelistenerhttps://www.food4rhino.com/en/app/code-listenerVScodeVScode插件:Pythonhttps://marketplace.visualstudio.com/items?itemName=ms-python.pythonRhinoPythonhttps://marketplace.visualstudio.com/items?itemName=desi

2021-07-10 15:59:17 1679 3

原创 RhinoPython点干扰渐变圆

在建立二维点阵的基础上,增添Attractor干扰点,进而绘制渐变圆。import rhinoscriptsyntax as rsimport mathpts=[]for i in range(15): for j in range(15): x=i*10 y=j*10 z=0 pts.append((x,y,z)) attractor=rs.GetPoint('select a point')for

2021-07-10 14:53:18 406

原创 RhinoPython渐变线条图案

这个小案例主要在于嵌套循环语句的使用,做出二维点阵,进而将左侧的举行线条复制(定位)到二维点阵上并做逐步旋转的操作。import rhinoscriptsyntax as rsimport mathpts=[]for i in range(15): for j in range(15): x=i*10 y=j*10 z=0 pts.append((x,y,z))#print pts#crv=rs.AddInterpC

2021-07-10 12:24:42 666

原创 数据可视化——绘制平行坐标图

import pandas as pdimport numpy as npfrom pyecharts import options as optsfrom pyecharts.charts import Page, Parallel# read csv filedata = pd.read_csv(r"C:\Users\aaa\Desktop\CDRF submission_0402\data_2(1).csv")# record the keys of the datakeys = d.

2021-07-09 12:53:05 2589 1

原创 数据随机采样并可视化

四维变量随机采样,可视化采样结果。import numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dsize = np.linspace(1, 2, 100, True)hor = np.linspace(-1, 1, 100, True)vec = np.linspace(0.2, 0.6, 40, True)scale = np.li.

2021-07-09 12:48:34 299

原创 python-joypy库 峰峦图绘制

importjoypyimportpandasaspdimportnumpyasnpfrommatplotlibimportpyplotaspltfrommatplotlibimportcm%matplotlibinlinetemp=pd.read_csv(r"C:\Users\aaa\Desktop\temperature.csv",comment="%")temp.head()labels=[mifm%1==0elseNonefo...

2021-07-09 12:40:55 1258

原创 RhinoPython圆形图案练习

绘制线条图案。#coding=utf-8import rhinoscriptsyntax as rsimport random as rnd#设定圆心位置center_pt=rs.GetObject('select a center',rs.filter.point)#绘制一个圆radius=rnd.randint(15,30)circle=rs.AddCircle(center_pt,radius)#分割这个圆segments=rnd.randint(4,10)pts=r.

2021-07-09 12:36:45 390

LEED V4 BD+C-RG.pdf

美国LEED V4文档

2021-07-11

GrasshopperPrimer_V3-3_EN.pdf

Grasshopper英文文档

2021-07-11

fluent python

Learn how to write idiomatic, effective Python code by leveraging its best features. Python's simplicity quickly lets you become productive with it, but this often means you aren’t using everything the language has to offer. By taking you through Python’s key language features and libraries, this practical book shows you how to make your code shorter, faster, and more readable all at the same time—what experts consider Pythonic., Many programmers who learn Python basics fall into the trap of reinventing the wheel because of past experience in other languages, and try to bend the language to patterns that don't really apply to it. Author Luciano Ramalho, a Python Software Foundation member and Python programmer for 15 years, helps you drop your accent from another language so you can code Python fluently., •Learn practical applications of generators for database processing, •Rethink some design patterns in a Python context, •Examine attribute descriptors and when to use them: the key to ORMs, •Explore Pythonic objects: protocols versus interfaces, abstract base classes and multiple inheritance

2017-09-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除