There is a code for a revolution of Koch Snowflake I just want to export it as an obj file (or any other 3D format)
kochinsert[pts_?MatrixQ] :=
Insert[#,
Composition[TranslationTransform[#[[2]] - #[[1]]],
RotationTransform[-\[Pi]/3, #[[1]]]][#[[2]]], 3] &[
Transpose[{1 - #, #}] &[Subdivide[3]].pts]
koch[pts_?MatrixQ] :=
Apply[Join, Prepend[Rest /@ Rest[#], First[#]]] &[
kochinsert /@ Partition[pts, 2, 1]]
halfkoch = {{0, 1}, {-1/(2 Sqrt[3]), 1/2}, {-Sqrt[3]/2,
1/2}, {-Sqrt[3]/2, 1/2}, {-1/Sqrt[3],
0}, {-Sqrt[3]/2, -1/2}, {-1/(2 Sqrt[3]), -1/2}, {0, -1}};
snowflake = Nest[koch, N[halfkoch, 20], 4];
circPoints = {{1, 0}, {1, 1}, {-1, 1}, {-1, 0}, {-1, -1}, {1, -1}, {1,0}};
circKnots = {0, 0, 0, 1/4, 1/2, 1/2, 3/4, 1, 1, 1};
circWts = {1, 1/2, 1/2, 1, 1/2, 1/2, 1};
graphics =
Graphics3D[BSplineSurface[
Map[Function[pt, Append[#1 pt, #2]], circPoints] & @@@ snowflake,
SplineClosed -> True, SplineDegree -> {1, 2},
SplineKnots -> {Automatic, circKnots},
SplineWeights -> ConstantArray[circWts, Length[snowflake]]],Boxed -> False]
I simply tried to export it as an obj file, but the given file is a very low resolution.
Export["KochSnowflakeRe.obj", graphics]
before
after