Beast Study: data i/o, functions, and graphics

Initialization

Dir= "V6";

SeedRandom[138];

Needs["Histograms`"]

Needs["ComputationalGeometry`"]

Helper Functions

ChopMaxMin[vals_, min_, max_] := vals/.{a_/;a<min->min,b_/;b>max->max}

Splines

division by zero is defined a zero

BSDivZero[num_, den_] := If[PossibleZeroQ[den],0,num/den]

the zero order basis functions (here look for the zero case first, as it is more frequent).

BSBF[i_Integer,0, uvec_,u_] := Module[
{ishift = i+1},
Piecewise[{{0, u < uvec[[ishift]] || u≥ uvec[[ishift+1]]}},1]
]

Recursive (deBoor ) definition for basis function (not most efficient).

BSBF[i_Integer, degree_Integer/;degree> 0,uvec_ ,u_] :=
 Module[
{
knotlength=Length[uvec],
ishift= i+1
},
If[degree+1 + ishift> knotlength,Print["illegal degree", ishift+1,">", knotlength - degree];Throw[illegalDegree]];
BSDivZero[u-uvec[[ishift]],uvec[[ishift+degree]]-uvec[[ishift]]]
BSBF[i,degree-1,uvec,u]
+
BSDivZero[uvec[[ishift+degree +1 ]]-u,uvec[[ishift+degree+1]]- uvec[[ishift+1]]]
BSBF[i+ 1,degree-1,uvec,u]
]

Take arbitrary knots and points, wrap on circle, return (number_points + degree) wrapped points and (numpoints + 2 degree + 1) "periodic" knots.

Wrap[knots_, points_, degree_] := Module[
{numknots=Length[knots],
numpoints = Length[points],
knotintervals= Differences[knots],
closedknots,
closedpoints
},
closedknots[1] =Last[knots] + First[knotintervals]; (*these are the additional knots, to be joined to the original*)
closedknots[n_] :=closedknots[n-1] + knotintervals[[Mod[n,(numknots-1),1]]];
closedpoints = NestWhile[Join[#,#]&,points,(Length[#] ≤ numpoints+degree)&][[1;;degree+numpoints]];
{closedpoints,Join[knots,Table[closedknots[i],{i,1,2 degree+1}]]}
]

BSplinePeriodic[controlpoints_, knots_, degree_,u_]:=
Module[
{
closedpoints,
closedknots
},
{closedpoints,closedknots}= Wrap[knots,controlpoints,degree];
Sum[BSBF[i,degree,closedknots,u] closedpoints[[i+1]],{i,0,Length[closedpoints]-1}]
]

uniformKnots[numsides_] := Range[numsides+1];

add up the sides along the perimeter of a polygon given ITs vertex coordinates.

polygonSides[iverts_]:= Norm/@Table[iverts[[Mod[i+1,Length[iverts],1]]] - iverts[[i]],{i,1,Length[iverts]}]

polygonSides[{{-1,-1},{1,-1},{1,1},{-1,1}}]
polygonSides[{{0,1},{-1/2,0},{1/2,0}}]

Importing and collating data

rawData = Import["/Users/ccarter/People/Neri/Chair/UVdata_NewSurf_01.csv", "CSV"];

rawData[[1,1;;2]]

Note: check data from file, format may change, wise to check

XYZ

uvXYZ = Table[{rawData[[i, 1 ;; 2]], rawData[[i, 3 ;; 5]]}, {i, 1, Length[rawData]}];
uvXYZ // Short

dataX = Sort[ Map[{First[#], #[[2, 1]]} &, uvXYZ]];
Length[dataX]
dataX // Short

dataY = Sort[ Map[{First[#], #[[2, 2]]} &, uvXYZ]]; dataZ = Sort[ Map[{First[#], #[[2, 3]]} &, uvXYZ]];

Curvature

meanCurvatureValuesRaw = Table[rawData[[i,-1]],{i,1,Length[rawData]}];
meanCurvatureValuesRaw//Short
{mincuve,maxcurve}=Through[{Min,Max}[meanCurvatureValuesRaw]]

Normals

uvnormals= Table[{rawData[[i,1;;2]],rawData[[i,6;;8]]},{i,1,Length[rawData]}];
uvnormals//Short

{nxdata,nydata,nzdata}= Table[Sort[ Map[{First[#],#[[2,i]]}&,uvnormals]],{i,3}];

Data Visualization and Rescaling

Histogram[meanCurvatureValuesRaw,HistogramCategories-> 50]

Changed to Absolute Curvature

Values of curvature limits may change

meanCurvatureValuesAbs= Map[Abs,meanCurvatureValuesRaw];
meanCurvatureValuesAbs//Short

{mincurvatureabs,maxcurvatureabs}={Min[meanCurvatureValuesAbs],Max[meanCurvatureValuesAbs]}

Histogram[meanCurvatureValuesAbs,HistogramCategories-> 50]

{{{u, v}, H}, ..}

dataCurvature= Table[{rawData[[i,1;;2]],meanCurvatureValuesAbs[[i]]/maxcurvatureabs},{i,1,Length[rawData]}];
dataCurvature//Short

Histogram[Last/@dataCurvature,HistogramCategories-> 50]

{{{u, v}, H}, ..}

Normal angle maps

Plot[1-(2/Pi)Abs[ArcSin[z]],{z,-1,1}]

Attempts to mirror

(*mdataX= (*will need to fix*)Sort@Join[dataX,Select[Map[{{-#[[1,1]],#[[1,2]]},#[[2]]}&,Table[{{-10,0}+dataX[[i,1]],dataX[[i,2]]},{i,1,Length[dataX]}]],(#[[1,1]]≠ 5)&]]*)

(*mdataY=Sort@Join[dataY,Select[Map[{{-#[[1,1]],#[[1,2]]},#[[2]]}&,Table[{{-10,0}+dataY[[i,1]],dataY[[i,2]]},{i,1,Length[dataY]}]],(#[[1,1]]≠ 5)&]]*)

(*mdataZ=Sort@Join[dataZ,Select[Map[{{-#[[1,1]],#[[1,2]]},#[[2]]}&,Table[{{-10,0}+dataZ[[i,1]],dataZ[[i,2]]},{i,1,Length[dataZ]}]],(#[[1,1]]≠ 5)&]]*)

Interpolations

Look at interpolation order as improvement in future

{fx,fy,fz}= Interpolation/@{dataX,dataY,dataZ}

dfxdu = D[fx[u,v],u]; dfxdv= D[fx[u,v],v];
dfydu = D[fy[u,v],u]; dfydv= D[fy[u,v],v];
dfzdu = D[fz[u,v],u]; dfzdv= D[fz[u,v],v];

dfxdu/.{u-> 4,v-> 3}

area[uval_,vval_] :=  Norm[{dfxdu,dfydu,dfzdu}\[Cross]{dfxdv,dfydv,dfzdv}]/.{u-> uval, v-> vval}

area[4,3.1]

bounds= {{0,0},{11,0},{11,7},{0,7}};

(*
mx[u_,v_]:=(*will need to fix*)Piecewise[{{fx[u,v],0≤ u ≤ 8.5}, {fx[2*8.5-u,v],8.5 < u ≤ 2*8.5}}]
my[u_,v_]:=Piecewise[{{fy[u,v],0≤ u ≤ 8.5}, {2*50.4042 -fy[2*8.5-u,v],8.5 < u ≤ 2*8.5}}]
mz[u_,v_]:=Piecewise[{{fz[u,v],0≤ u ≤ 8.5}, {fz[2*8.5-u,v],8.5 < u ≤ 2*8.5}}]
*)

(*{mfx,mfy,mfz}= Interpolation/@{mdataX,mdataY,mdataZ}*)

Curvature= Interpolation[dataCurvature]

{nx,ny,nz}= Interpolation/@{nxdata,nydata,nzdata}

3D representations of interpolations

surface with uv mesh

p=ParametricPlot3D[{fx[u,v] , fy[u,v],fz[u,v]},{u,0,11},{v,0,7},(*PlotStyle->FaceForm[Orange,Yellow],*)Mesh-> True,(*RegionFunction->(Sin[(#3 #2 - #1 #4/8)/350]^2<.5  &),*)MeshShading-> {Table[RGBColor@@({0.1,0.2,1}RandomReal[{},3]),{10}],Table[Glow[RGBColor@@({0.1,0.5,1}RandomReal[{},3])],{10}]},Lighting-> "Neutral",ImageSize->Large,AxesLabel->{fX,fY,fZ},BoxRatios-> Automatic,ImageSize-> Full]

(*Export["/Users/ccarter/People/Neri/Chair/testHalf_mod.dxf",p,"DXF"]*)

curvature

pH=ParametricPlot3D[{fx[u,v] , fy[u,v],fz[u,v]},{u,0,11},{v,0,7},Mesh-> True,Lighting-> "Neutral",ColorFunction->Function[{x,y,z,u,v},Hue[0.75Curvature[u,v]]],ColorFunctionScaling-> False, ImageSize->Large,AxesLabel->{fX,fY,fZ},BoxRatios-> {1,1,1}]

angle from vertical

pNorm= ParametricPlot3D[{fx[u,v] , fy[u,v],fz[u,v]},{u,0,11},{v,0,7},Mesh-> True,Lighting-> "Neutral",ColorFunction->Function[{x,y,z,u,v},Hue[0.75(1-(2/Pi)Abs[ArcSin[nz[u,v]]])]],ColorFunctionScaling-> False, ImageSize->Large,AxesLabel->{fX,fY,fZ},BoxRatios-> {1,1,1}]

Voronoi cells

Uniform Voronoi

bounds={{0,0},{11,0},{11,7},{0,7}}

{{llx,lly},{lrx,lry},{urx,ury},{ulx,uly}}=bounds

data2D=Table[{ RandomReal[{bounds[[1,1]],bounds[[2,1]]}],RandomReal[{bounds[[1,2]],bounds[[4,2]]}]},{24}];

(Shallow[#,{5,6}]&)[delval=DelaunayTriangulation[data2D]]

{vorvert,vorval}=VoronoiDiagram[data2D];

{diagvert1,diagval1}=BoundedDiagram[bounds,data2D];

diagvert1//Short
diagval1//Short

DiagramPlot[data2D,diagvert1,diagval1]

Curvature correlated Voronoi

the set of u-v patches to be weighted

bounds

patchSize=  .05
patches =Flatten[ Table[{u,v}+ {1,1}patchSize/2,{u,llx,lrx-patchSize,patchSize},{v,lly,uly-patchSize,patchSize}],1];
patches//Short

patchAreas= ({area@@#,#}&)/@ patches;patchAreas//Short

Histogram[Map[First,patchAreas]]

{minarea,maxarea}={Min[Map[First,patchAreas]],Max[Map[First,patchAreas]]}

scaledpatchAreas= Map[{First[#]/maxarea,Last[#]}&,patchAreas];

Count[scaledpatchAreas,{0.0,___}]

Histogram[Map[First,scaledpatchAreas]]

{minarea,maxarea}={Min[Map[First,scaledpatchAreas]],Max[Map[First,scaledpatchAreas]]}

interpolate the curvature at each corner (may wish to move this to center) rescale and chop according to method of curvature data extraction

patchCurvatures= ({Abs[Curvature@@#],#}&)/@ patches;patchCurvatures//Short

Histogram[Map[First,patchCurvatures]]

{mincurv,maxcurv}={Min[Map[First,patchCurvatures]],Max[Map[First,patchCurvatures]]}

Arbitrary scaling for patch choice: area*(1+8 Abs[curvature]^2)

numpatches= 1000;
patchSelection = RandomChoice[Map[First,scaledpatchAreas](1+ 8* Map[First,patchCurvatures]^2)-> Evaluate@Range[Length[patchCurvatures]],numpatches];
patchSelection//Short

Create 2D voronoi data from patch selection

vordataCurv = Table[patches[[patchSelection[[i]]]]+ RandomReal[{-1,1}patchSize/2],{i,1,Length[patchSelection]}];
data2D//Short

Bounded voronoi computation

Timing[{vorvertsCurv,vorvalsCurv}=BoundedDiagram[bounds,vordataCurv];]

vorvertsCurv//Short
vorvalsCurv//Short

DiagramPlot[vordataCurv,vorvertsCurv,vorvalsCurv]

Macroscale Voronoi for buffers

Use nearest on higher scale poisson distribution to get voronoi generating function.

seconddata2D=Table[{ RandomReal[{bounds[[1,1]],bounds[[2,1]]}],RandomReal[{bounds[[1,2]],bounds[[4,2]]}]},{85}];

nf=Nearest[seconddata2D]

Data Precalculations

materialChoices = {GrayLevel[0.8],GrayLevel[0.6],GrayLevel[0.2],GrayLevel[0]};
materialIndices=Range[Length[materialChoices]];
materialMembers= Table[{},{Length[materialChoices]}]

colorOfMaterial[materialindex_] := materialChoices[[materialindex]]

Gradient choice

LoopMaterial= Table[0,{Length[vorvalsCurv]}];
matchoice[i_,localnorm_]:=Module[{angleweight,nz,weights,thecolor,theindex},
(*Print[localnorm];*)
nz= localnorm[[3]];
weights=Table[ 1-Abs[nz]^2 + 2(Abs[nz]^2-0.5 )xtab,{xtab,0,1,1/(Length[materialChoices]-1)}];(*Print["nz ",nz, "\t wts",weights];*)
theindex=RandomChoice[weights-> materialIndices];
AppendTo[materialMembers[[theindex]],i];
LoopMaterial[[i]]= materialChoices[[theindex]];
]

Transpose[{vorvalsCurv[[123,2]]}]

vorvertsCurv[[158]]

Extract[vorvertsCurv,Transpose[{vorvalsCurv[[123,2]]}]]

loopInPlaneCenter=Map[Mean[Extract[vorvertsCurv,Transpose[{vorvalsCurv[[#,2]]}]]]&,Range[Length[vorvalsCurv]]];
loopInPlaneCenter//Short

loopNormal=Map[Normalize[Through[{nx,ny,nz}@@#]]&,loopInPlaneCenter];

loopNormal[[1]]

matchoice[1,loopNormal[[1]]]

materialMembers= Table[{},{Length[materialChoices]}]
Table[matchoice[i,loopNormal[[i]]],{i,Length[loopNormal]}];
Short[materialMembers,12]
Short[LoopMaterial,12]

Map[Length,materialMembers]

BarChart[Map[Length,materialMembers],FrequencyData-> True,BarStyle-> materialChoices]

getLoopVertices[i_, verts_,vors_]:= Module[{ivor,itemp},
ivor= vors[[i,2]];
Table[verts[[ivor[[itemp]]]],{itemp,1,Length[ivor]}]
]

loopVertices= Table[getLoopVertices[i,vorvertsCurv,vorvalsCurv],{i,1,Length[vorvalsCurv]}];
loopVertices//Short

getBufferSize[i_,nearestfunction_]:= Module[{closest,secondclosest,frac},
{closest,secondclosest}=nearestfunction[loopInPlaneCenter[[i]],2]; 
frac=Norm[(loopInPlaneCenter[[i]]-closest).(secondclosest-closest)]/Norm[(secondclosest-closest)];
(*scaling bsize with frac: fatter in middle, parameters somewhat arbitrary*)
0.33Exp[-12(frac-0.5)^2]
]

loopBuffers= Table[getBufferSize[i,nf],{i,1,Length[vorvalsCurv]}];
loopBuffers//Short

getShrunkVerts[i_]:= Module[{bsize,meanpos},
bsize=loopBuffers[[i]];
meanpos= loopInPlaneCenter[[i]];
Map[(meanpos+(1-bsize)*(#-meanpos))&,loopVertices[[i]]]
]

loopShrunkVerts= Table[getShrunkVerts[i],{i,1,Length[vorvalsCurv]}];

splineOrder=3;
getSplineFunction[i_] := Module[{knots,shrunkverts,meanpos,bsize},
bsize=loopBuffers[[i]];
meanpos= loopInPlaneCenter[[i]];
shrunkverts=loopShrunkVerts[[i]];
knots= Range[Length[loopVertices[[i]]]];
BSplinePeriodic[shrunkverts,knots,splineOrder,s]
]

Random spline order

loopSplineOrder=Table[ RandomChoice[{6,2,1}-> {2,3,4}],{Length[vorvalsCurv]}];

loopSplineOrder=Table[ 2,{Length[vorvalsCurv]}];(*fill and replace*)

getSplineOrder[i_,localnorm_]:=Module[{nz,weights,theindex},
(*Print[localnorm];*)
nz= localnorm[[3]];
weights=Table[( 1-Abs[nz]+ 2(Abs[nz]-0.5 )xtab)(1-Abs[nz]),{xtab,0,.5,.5}];(*Print["nz ",nz, "\t wts",weights];*)
theindex=RandomChoice[weights-> {3,2}];
loopSplineOrder[[i]]= theindex;
]

Table[getSplineOrder[i,loopNormal[[i]]],{i,Length[loopNormal]}];
Short[loopSplineOrder,12]

Mean[loopSplineOrder]//N

getSplineFunction[i_] := Module[{knots,shrunkverts,meanpos,bsize},
bsize=loopBuffers[[i]];
meanpos= loopInPlaneCenter[[i]];
shrunkverts=loopShrunkVerts[[i]];
knots= Range[Length[loopVertices[[i]]]];

BSplinePeriodic[shrunkverts,knots,loopSplineOrder[[i]],s]
]

loopSpline= Table[getSplineFunction[i],{i,1,Length[vorvalsCurv]}];

loopVertices[[12]]

loopShrunkVerts[[12]]

numSegments= 8;
getSplineVertsInPlane[i_]:= Module[{tp,tn,knots,iter,numsides,splineOrd},
numsides=Length[loopVertices[[i]]];
knots=Range[numsides];
splineOrd=loopSplineOrder[[i]];
{tp,tn}= Wrap[knots,loopShrunkVerts[[i]],splineOrd];
Table[loopSpline[[i]]/.s-> iter,{iter,tn[[splineOrd+1]],tn[[splineOrd+1+numsides]],Abs[tn[[splineOrd+1]]-tn[[splineOrd+1+numsides]]]/numSegments}]
]

iloop2D=0;ProgressIndicator[Dynamic[iloop2D],{0,Length[vorvalsCurv]}]

splineVertsInPlane= Table[getSplineVertsInPlane[iloop2D],{iloop2D,1,Length[vorvalsCurv]}];

iloop3D=0;ProgressIndicator[Dynamic[iloop3D],{0,Length[vorvalsCurv]}]

loopSplineVertices3D= Table[Map[ Through[{fx,fy,fz}@@#]&,splineVertsInPlane[[iloop3D]]],{iloop3D,1,Length[vorvalsCurv]}];
Short[loopSplineVertices3D,36]

(*loopSplineVerts3D= Table[loopSplineVertices3D[i],{i,1,Length[vorvalsCurve]}];*)

Projection of u-v plane Voronoi loops onto 3D interpolated surface

MakeLoop3D[i_]:=
{LoopMaterial[[i]], Polygon[Join[loopSplineVertices3D[[i]],{First[loopSplineVertices3D[[i]]]}]]}

3D Graphics Examples

MakeLoop3D[12]

Graphics3D[MakeLoop3D[5],Lighting-> "Neutral"]

iloop=0;ProgressIndicator[Dynamic[iloop],{0,Length[vorvalsCurv]}]

g3d=Graphics3D[Table[MakeLoop3D[iloop],{iloop,1,Length[vorvalsCurv]}],ImageSize-> Full]

tmp=Show[g3d,Lighting->{{"Ambient", White}}]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/allmaterials.eps",tmp,"EPS"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/allmaterials.dxf",tmp,"DXF"]

graphicsmat[i_]:= graphicsmat[i]=Graphics3D[Map[MakeLoop3D[#]&, materialMembers[[i]]],ImageSize-> Full,Lighting->{{"Ambient", White}}]

graphicsmat[1]

graphicsmat[2]

graphicsmat[3]

graphicsmat[4]

Writing data out

(*WriteLoop3D[i_] := Module[{directory= "/Users/ccarter/People/Neri/Chair/Data/",filename},
filename= StringJoin[directory,"loop_",ToString[NumberForm[i,6,NumberPadding-> {"0",""}]],"dxf"];
Export[filename,Graphics3D[MakeLoop3D[i],Lighting->{{"Ambient", White}}],"DXF"]
]*)

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_1.dxf",graphicsmat[1],"DXF"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_2.dxf",graphicsmat[2],"DXF"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_3.dxf",graphicsmat[3],"DXF"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_4.dxf",graphicsmat[4],"DXF"]

Bumps

pushout[theverts_, distance_, {nx_, ny_, nz_}]:= Table[theverts[[i]] + distance*{nx,ny,nz},{i,1,Length[theverts]}]

sharp

bumpProfile[verts3D_, frac_, meanposition_, locnorm_, approxradius_] := 
pushout[
Map[(meanposition + frac(#-meanposition))&,verts3D],(*???*)
(frac approxradius - Sqrt[2]),
locnorm
]

soft

bumpProfile[verts3D_, frac_, meanposition_, locnorm_, approxradius_] := 
pushout[
Map[(meanposition + frac(#-meanposition))&,verts3D],(*???*)
-Sqrt[2](Exp[-2(frac approxradius )^4]-Exp[-2( approxradius )^4])/(1-Exp[-2( approxradius )^4]),
locnorm
]

Need to add a final cone point for lofting.  Shape is still arbitrary

MakeBump[i_]:= Module[
{
output,meaninplane,meanpos,approxrad,loopverts
},
output={FaceForm[],EdgeForm[LoopMaterial[[i]]],MakeLoop3D[i]};
meaninplane=Mean[splineVertsInPlane[[i]]];
approxrad= Sqrt[Norm[Map[(#-meaninplane)&,splineVertsInPlane[[i]]]]];
meanpos= Mean[loopSplineVertices3D[[i]]];
(*Return[output]*)
Table[
AppendTo[output,
{EdgeForm[Hue[.75 ifrac]],
Polygon[bumpProfile[loopSplineVertices3D[[i]],ifrac,meanpos,loopNormal[[i]],approxrad]]
}
] ,{ifrac,{.9,.6,.3,.1}}
];
AppendTo[output,{RGBColor[1,.2,0],Point[meanpos- Sqrt[2] loopNormal[[i]]]}];
output
]

MakeBump[i_, frac_]:= Module[
{
output,meaninplane,meanpos,approxrad,loopverts
},

meanpos= Mean[loopSplineVertices3D[[i]]];
meaninplane=Mean[splineVertsInPlane[[i]]];
approxrad= Sqrt[Norm[Map[(#-meaninplane)&,splineVertsInPlane[[i]]]]];

Which[frac==1 || frac==1.0,
output={FaceForm[],EdgeForm[LoopMaterial[[i]]],MakeLoop3D[i]},
frac==0 || frac== 0.0,
output={RGBColor[1,.2,0],Point[Mean[bumpProfile[loopSplineVertices3D[[i]],0.025,meanpos,loopNormal[[i]],approxrad]]]},
True,

output=
{FaceForm[],EdgeForm[Hue[.75 frac]],
Polygon[bumpProfile[loopSplineVertices3D[[i]],frac,meanpos,loopNormal[[i]],approxrad]]
}
];
output
]

Graphics3D[MakeBump[23]]

iloop2=0;ProgressIndicator[Dynamic[iloop2],{0,Length[vorvalsCurv]}]

Clear[g3dBumpSet]

g3dBumpSet[frac_]:=g3dBumpSet[frac]=Graphics3D[Table[MakeBump[iloop2,frac],{iloop2,1,Length[vorvalsCurv]}]];

g3dBumpSet[1]

g3dBumpSet[1]
g3dBumpSet[.9]
g3dBumpSet[.6]
g3dBumpSet[.3]
g3dBumpSet[.1]
g3dBumpSet[0.0]

allBumps=Show[Table[g3dBumpSet[j],{j,{1,.9,.6,.3,.1,0}}]]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/allmaterials_allbumps.eps",allBumps,"EPS"]
Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/allmaterials_allbumps.dxf",allBumps,"DXF"]

ExpSet[frac_] := {Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/bumpset_"<>ToString[frac]<>".eps",g3dBumpSet[frac],"EPS"],
Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/bumpset_"<>ToString[frac]<>".svg",g3dBumpSet[frac],"svg"]}

ExpSet[1]
ExpSet[.9]
ExpSet[.5]
ExpSet[.25]
ExpSet[.1]
ExpSet[0]

(*Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/bumps.dxf",g3dBumps,"DXF"]*)

bumpssmat[i_]:= bumpssmat[i]=Graphics3D[Map[MakeBump[#]&, materialMembers[[i]]],ImageSize-> Full,Lighting->{{"Ambient", White}}]

bumpssmat[1]

bumpssmat[2]

bumpssmat[3]

bumpssmat[4]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_1+bumps.dxf",bumpssmat[1],"DXF"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_2+bumps.dxf",bumpssmat[2],"DXF"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_3+bumps.dxf",bumpssmat[3],"DXF"]

Export["/Users/ccarter/People/Neri/Chair/ChairTrails/"<>Dir<>"/material_4+bumps.dxf",bumpssmat[4],"DXF"]