summaryrefslogtreecommitdiffhomepage
path: root/samples/99_genre_3d
diff options
context:
space:
mode:
authorAmir Rajan <[email protected]>2021-01-18 12:08:34 -0600
committerAmir Rajan <[email protected]>2021-01-18 12:08:34 -0600
commita4b9c048a1d751f5226833bb0c527ba1a8ac5d09 (patch)
tree3f2535e7a6272e796d50e7f07c906d4c9eb1b14a /samples/99_genre_3d
parenta24a71805b1924ae7f80776c736f94575c171d2c (diff)
downloaddragonruby-game-toolkit-contrib-a4b9c048a1d751f5226833bb0c527ba1a8ac5d09.tar.gz
dragonruby-game-toolkit-contrib-a4b9c048a1d751f5226833bb0c527ba1a8ac5d09.zip
Synced with 2.3.
Diffstat (limited to 'samples/99_genre_3d')
-rw-r--r--samples/99_genre_3d/01_3d_cube/app/main.rb50
-rw-r--r--samples/99_genre_3d/01_3d_cube/sprites/square-blue.pngbin0 -> 283 bytes
-rw-r--r--samples/99_genre_3d/02_wireframe/app/main.rb150
-rw-r--r--samples/99_genre_3d/02_wireframe/data/shuttle.off284
-rw-r--r--samples/99_genre_3d/02_wireframe/data/what-is-this.txt1
5 files changed, 485 insertions, 0 deletions
diff --git a/samples/99_genre_3d/01_3d_cube/app/main.rb b/samples/99_genre_3d/01_3d_cube/app/main.rb
new file mode 100644
index 0000000..fc95291
--- /dev/null
+++ b/samples/99_genre_3d/01_3d_cube/app/main.rb
@@ -0,0 +1,50 @@
+STARTX = 0.0
+STARTY = 0.0
+ENDY = 20.0
+ENDX = 20.0
+SPINPOINT = 10
+SPINDURATION = 400
+POINTSIZE = 8
+BOXDEPTH = 40
+YAW = 1
+DISTANCE = 10
+
+def tick args
+ args.outputs.background_color = [0, 0, 0]
+ a = Math.sin(args.state.tick_count / SPINDURATION) * Math.tan(args.state.tick_count / SPINDURATION)
+ s = Math.sin(a)
+ c = Math.cos(a)
+ x = STARTX
+ y = STARTY
+ offset_x = (1280 - (ENDX - STARTX)) / 2
+ offset_y = (360 - (ENDY - STARTY)) / 2
+
+ srand(1)
+ while y < ENDY do
+ while x < ENDX do
+ if (y == STARTY ||
+ y == (ENDY / 0.5) * 2 ||
+ y == (ENDY / 0.5) * 2 + 0.5 ||
+ y == ENDY - 0.5 ||
+ x == STARTX ||
+ x == ENDX - 0.5)
+ z = rand(BOXDEPTH)
+ z *= Math.sin(a / 2)
+ x -= SPINPOINT
+ u = (x * c) - (z * s)
+ v = (x * s) + (z * c)
+ k = DISTANCE.fdiv(100) + (v / 500 * YAW)
+ u = u / k
+ v = y / k
+ w = POINTSIZE / 10 / k
+ args.outputs.sprites << { x: offset_x + u - w, y: offset_y + v - w, w: w, h: w, path: 'sprites/square-blue.png'}
+ x += SPINPOINT
+ end
+ x += 0.5
+ end
+ y += 0.5
+ x = STARTX
+ end
+end
+
+$gtk.reset
diff --git a/samples/99_genre_3d/01_3d_cube/sprites/square-blue.png b/samples/99_genre_3d/01_3d_cube/sprites/square-blue.png
new file mode 100644
index 0000000..b840849
--- /dev/null
+++ b/samples/99_genre_3d/01_3d_cube/sprites/square-blue.png
Binary files differ
diff --git a/samples/99_genre_3d/02_wireframe/app/main.rb b/samples/99_genre_3d/02_wireframe/app/main.rb
new file mode 100644
index 0000000..8407d47
--- /dev/null
+++ b/samples/99_genre_3d/02_wireframe/app/main.rb
@@ -0,0 +1,150 @@
+def tick args
+ args.state.model ||= Object3D.new('data/shuttle.off')
+ args.state.mtx ||= rotate3D(0, 0, 0)
+ args.state.inv_mtx ||= rotate3D(0, 0, 0)
+ delta_mtx = rotate3D(args.inputs.up_down * 0.01, input_roll(args) * 0.01, args.inputs.left_right * 0.01)
+ args.outputs.lines << args.state.model.edges
+ args.state.model.fast_3x3_transform! args.state.inv_mtx
+ args.state.inv_mtx = mtx_mul(delta_mtx.transpose, args.state.inv_mtx)
+ args.state.mtx = mtx_mul(args.state.mtx, delta_mtx)
+ args.state.model.fast_3x3_transform! args.state.mtx
+ args.outputs.background_color = [0, 0, 0]
+ args.outputs.debug << args.gtk.framerate_diagnostics_primitives
+end
+
+def input_roll args
+ roll = 0
+ roll += 1 if args.inputs.keyboard.e
+ roll -= 1 if args.inputs.keyboard.q
+ roll
+end
+
+def rotate3D(theta_x = 0.1, theta_y = 0.1, theta_z = 0.1)
+ c_x, s_x = Math.cos(theta_x), Math.sin(theta_x)
+ c_y, s_y = Math.cos(theta_y), Math.sin(theta_y)
+ c_z, s_z = Math.cos(theta_z), Math.sin(theta_z)
+ rot_x = [[1, 0, 0], [0, c_x, -s_x], [0, s_x, c_x]]
+ rot_y = [[c_y, 0, s_y], [0, 1, 0], [-s_y, 0, c_y]]
+ rot_z = [[c_z, -s_z, 0], [s_z, c_z, 0], [0, 0, 1]]
+ mtx_mul(mtx_mul(rot_x, rot_y), rot_z)
+end
+
+def mtx_mul(a, b)
+ is = (0...a.length)
+ js = (0...b[0].length)
+ ks = (0...b.length)
+ is.map do |i|
+ js.map do |j|
+ ks.map do |k|
+ a[i][k] * b[k][j]
+ end.reduce(&:plus)
+ end
+ end
+end
+
+class Object3D
+ attr_reader :vert_count, :face_count, :edge_count, :verts, :faces, :edges
+
+ def initialize(path)
+ @vert_count = 0
+ @face_count = 0
+ @edge_count = 0
+ @verts = []
+ @faces = []
+ @edges = []
+ _init_from_file path
+ end
+
+ def _init_from_file path
+ file_lines = $gtk.read_file(path).split("\n")
+ .reject { |line| line.start_with?('#') || line.split(' ').length == 0 } # Strip out simple comments and blank lines
+ .map { |line| line.split('#')[0] } # Strip out end of line comments
+ .map { |line| line.split(' ') } # Tokenize by splitting on whitespace
+ raise "OFF file did not start with OFF." if file_lines.shift != ["OFF"] # OFF meshes are supposed to begin with "OFF" as the first line.
+ raise "<NVertices NFaces NEdges> line malformed" if file_lines[0].length != 3 # The second line needs to have 3 numbers. Raise an error if it doesn't.
+ @vert_count, @face_count, @edge_count = file_lines.shift&.map(&:to_i) # Update the counts
+ # Only the vertex and face counts need to be accurate. Raise an error if they are inaccurate.
+ raise "Incorrect number of vertices and/or faces (Parsed VFE header: #{@vert_count} #{@face_count} #{@edge_count})" if file_lines.length != @vert_count + @face_count
+ # Grab all the lines describing vertices.
+ vert_lines = file_lines[0, @vert_count]
+ # Grab all the lines describing faces.
+ face_lines = file_lines[@vert_count, @face_count]
+ # Create all the vertices
+ @verts = vert_lines.map_with_index { |line, id| Vertex.new(line, id) }
+ # Create all the faces
+ @faces = face_lines.map { |line| Face.new(line, @verts) }
+ # Create all the edges
+ @edges = @faces.flat_map(&:edges).uniq do |edge|
+ sorted = edge.sorted
+ [sorted.point_a, sorted.point_b]
+ end
+ end
+
+ def fast_3x3_transform! mtx
+ @verts.each { |vert| vert.fast_3x3_transform! mtx }
+ end
+end
+
+class Face
+
+ attr_reader :verts, :edges
+
+ def initialize(data, verts)
+ vert_count = data[0].to_i
+ vert_ids = data[1, vert_count].map(&:to_i)
+ @verts = vert_ids.map { |i| verts[i] }
+ @edges = []
+ (0...vert_count).each { |i| @edges[i] = Edge.new(verts[vert_ids[i - 1]], verts[vert_ids[i]]) }
+ @edges.rotate! 1
+ end
+end
+
+class Edge
+ attr_reader :point_a, :point_b
+
+ def initialize(point_a, point_b)
+ @point_a = point_a
+ @point_b = point_b
+ end
+
+ def sorted
+ @point_a.id < @point_b.id ? self : Edge.new(@point_b, @point_a)
+ end
+
+ def draw_override ffi
+ ffi.draw_line(@point_a.render_x, @point_a.render_y, @point_b.render_x, @point_b.render_y, 255, 0, 0, 128)
+ ffi.draw_line(@point_a.render_x+1, @point_a.render_y, @point_b.render_x+1, @point_b.render_y, 255, 0, 0, 128)
+ ffi.draw_line(@point_a.render_x, @point_a.render_y+1, @point_b.render_x, @point_b.render_y+1, 255, 0, 0, 128)
+ ffi.draw_line(@point_a.render_x+1, @point_a.render_y+1, @point_b.render_x+1, @point_b.render_y+1, 255, 0, 0, 128)
+ end
+
+ def primitive_marker
+ :line
+ end
+end
+
+class Vertex
+ attr_accessor :x, :y, :z, :id
+
+ def initialize(data, id)
+ @x = data[0].to_f
+ @y = data[1].to_f
+ @z = data[2].to_f
+ @id = id
+ end
+
+ def fast_3x3_transform! mtx
+ _x, _y, _z = @x, @y, @z
+ @x = mtx[0][0] * _x + mtx[0][1] * _y + mtx[0][2] * _z
+ @y = mtx[1][0] * _x + mtx[1][1] * _y + mtx[1][2] * _z
+ @z = mtx[2][0] * _x + mtx[2][1] * _y + mtx[2][2] * _z
+ end
+
+ def render_x
+ @x * (10 / (5 - @y)) * 170 + 640
+ end
+
+ def render_y
+ @z * (10 / (5 - @y)) * 170 + 360
+ end
+end \ No newline at end of file
diff --git a/samples/99_genre_3d/02_wireframe/data/shuttle.off b/samples/99_genre_3d/02_wireframe/data/shuttle.off
new file mode 100644
index 0000000..4d0803c
--- /dev/null
+++ b/samples/99_genre_3d/02_wireframe/data/shuttle.off
@@ -0,0 +1,284 @@
+OFF
+167 115 0
+-0.0556651316583157 -0.5373616218566895 0.2210596650838852
+-0.1558777540922165 -0.5373616218566895 0.1656820923089981
+-0.1971056312322617 -0.5373616218566895 0.0667097717523575
+0.0555876418948174 -0.5373616218566895 0.2210596650838852
+0.1558002829551697 -0.5373616218566895 0.1656820923089981
+0.1970281600952148 -0.5373616218566895 0.0667097717523575
+0.2002865821123123 -0.5373616218566895 -0.0815882310271263
+0.1503289043903351 -0.5373616218566895 -0.1599303781986237
+-0.2003640681505203 -0.5373616218566895 -0.0815882310271263
+-0.1504063904285431 -0.5373616218566895 -0.1599303781986237
+-0.0556651316583157 0.7521815299987793 0.2210596650838852
+-0.1558777540922165 0.7521815299987793 0.1656820923089981
+-0.1971056312322617 0.7521815299987793 0.0667097717523575
+0.0555876418948174 0.7521815299987793 0.2210596650838852
+0.1558002829551697 0.7521815299987793 0.1656820923089981
+0.1970281600952148 0.7521815299987793 0.0667097717523575
+0.2002865821123123 0.7521815299987793 -0.0815882310271263
+0.1503289043903351 0.7521815299987793 -0.1599303781986237
+0.0555877126753330 0.7521815299987793 -0.1941412389278412
+-0.2003640681505203 0.7521815299987793 -0.0815882310271263
+-0.1504063904285431 0.7521815299987793 -0.1599303781986237
+-0.0556652024388313 0.7521815299987793 -0.1941412389278412
+-0.0375367477536201 -0.8870638012886047 0.0328058265149593
+-0.1050905436277390 -0.8870638012886047 0.0040050041861832
+-0.1328824460506439 -0.8870638012886047 -0.0474686101078987
+0.0374592579901218 -0.8870638012886047 0.0328058265149593
+0.1050130575895309 -0.8870638012886047 0.0040050041861832
+0.1328049600124359 -0.8870638012886047 -0.0474686101078987
+0.1350014954805374 -0.8870638012886047 -0.1245955601334572
+0.1013247817754745 -0.8870638012886047 -0.1653398126363754
+0.0374593064188957 -0.8870638012886047 -0.1831322312355042
+-0.1350789815187454 -0.8870638012886047 -0.1245955601334572
+-0.1014022752642632 -0.8870638012886047 -0.1653398126363754
+-0.0375367961823940 -0.8870638012886047 -0.1831322312355042
+-0.0172216147184372 -0.9763066768646240 -0.0525034293532372
+-0.0481770746409893 -0.9763066768646240 -0.0657009631395340
+-0.0609122700989246 -0.9763066768646240 -0.0892879292368889
+0.0171441230922937 -0.9763066768646240 -0.0525034293532372
+0.0480995811522007 -0.9763066768646240 -0.0657009631395340
+0.0608347803354263 -0.9763066768646240 -0.0892879292368889
+0.0618413127958775 -0.9763066768646240 -0.1246301382780075
+0.0464094914495945 -0.9763066768646240 -0.1433005332946777
+0.0171441435813904 -0.9763066768646240 -0.1514536291360855
+-0.0619188025593758 -0.9763066768646240 -0.1246301382780075
+-0.0464869812130928 -0.9763066768646240 -0.1433005332946777
+-0.0172216352075338 -0.9763066768646240 -0.1514536291360855
+-0.0000387450963899 -1.0021373033523560 -0.1109079420566559
+-0.0445398576557636 0.7521816492080688 0.1774666309356689
+-0.1247099563479424 0.7521816492080688 0.1331645548343658
+0.0444623678922653 0.7521816492080688 0.1774666309356689
+0.1246324777603149 0.7521816492080688 0.1331645548343658
+0.1576147824525833 0.7521816492080688 0.0539867058396339
+0.1602215319871902 0.7521816492080688 -0.0646517053246498
+0.1202553808689117 0.7521816492080688 -0.1273254156112671
+0.0444624200463295 0.7521816492080688 -0.1546941250562668
+-0.1576922535896301 0.7521816492080688 0.0539867058396339
+-0.1602990031242371 0.7521816492080688 -0.0646517053246498
+-0.1203328520059586 0.7521816492080688 -0.1273254156112671
+-0.0445399098098278 0.7521816492080688 -0.1546941250562668
+-0.0445398576557636 0.7211543321609497 0.1774666309356689
+-0.1247099563479424 0.7211543321609497 0.1331645548343658
+0.0444623678922653 0.7211543321609497 0.1774666309356689
+0.1246324777603149 0.7211543321609497 0.1331645548343658
+0.1576147824525833 0.7211543321609497 0.0539867058396339
+0.1602215319871902 0.7211543321609497 -0.0646517053246498
+0.1202553808689117 0.7211543321609497 -0.1273254156112671
+0.0444624200463295 0.7211543321609497 -0.1546941250562668
+-0.1576922535896301 0.7211543321609497 0.0539867058396339
+-0.1602990031242371 0.7211543321609497 -0.0646517053246498
+-0.1203328520059586 0.7211543321609497 -0.1273254156112671
+-0.0445399098098278 0.7211543321609497 -0.1546941250562668
+-0.0158861558884382 0.7211543321609497 -0.0512818209826946
+-0.0230847373604774 0.7211543321609497 -0.0244163442403078
+-0.0427516363561153 0.7211543321609497 -0.0047494410537183
+-0.0696171224117279 0.7211543321609497 0.0024491411168128
+-0.0964826047420502 0.7211543321609497 -0.0047494443133473
+-0.1161495000123978 0.7211543321609497 -0.0244163367897272
+-0.1233480796217918 0.7211543321609497 -0.0512818172574043
+-0.1161495000123978 0.7211543321609497 -0.0781472921371460
+-0.0964826121926308 0.7211543321609497 -0.0978141874074936
+-0.0696171447634697 0.7211543321609497 -0.1050127968192101
+-0.0427516624331474 0.7211543321609497 -0.0978142097592354
+-0.0230847634375095 0.7211543321609497 -0.0781473368406296
+0.0158086661249399 0.7211543321609497 -0.0512818209826946
+0.0230072475969791 0.7211543321609497 -0.0244163442403078
+0.0426741465926170 0.7211543321609497 -0.0047494410537183
+0.0695396289229393 0.7211543321609497 0.0024491411168128
+0.0964051112532616 0.7211543321609497 -0.0047494443133473
+0.1160720214247704 0.7211543321609497 -0.0244163367897272
+0.1232706010341644 0.7211543321609497 -0.0512818172574043
+0.1160720214247704 0.7211543321609497 -0.0781472921371460
+0.0964051261544228 0.7211543321609497 -0.0978141874074936
+0.0695396587252617 0.7211543321609497 -0.1050127968192101
+0.0426741726696491 0.7211543321609497 -0.0978142097592354
+0.0230072736740112 0.7211543321609497 -0.0781473368406296
+-0.0269042234867811 0.7211543321609497 0.1413877010345459
+-0.0465711168944836 0.7211543321609497 0.1217208057641983
+-0.0000387450963899 0.7211543321609497 0.1485862880945206
+0.0268267337232828 0.7211543321609497 0.1413877010345459
+0.0464936271309853 0.7211543321609497 0.1217208057641983
+0.0536922141909599 0.7211543321609497 0.0948553308844566
+0.0464936345815659 0.7211543321609497 0.0679898560047150
+0.0268267467617989 0.7211543321609497 0.0483229570090771
+-0.0000387450963899 0.7211543321609497 0.0411243513226509
+-0.0537697039544582 0.7211543321609497 0.0948553308844566
+-0.0465711243450642 0.7211543321609497 0.0679898560047150
+-0.0269042365252972 0.7211543321609497 0.0483229570090771
+-0.0105130579322577 0.7469451427459717 -0.0512818209826946
+-0.0184314977377653 0.7469451427459717 -0.0217297952622175
+-0.0400650873780251 0.7469451427459717 -0.0000962029516813
+-0.0696171224117279 0.7469451427459717 0.0078222369775176
+-0.0991691499948502 0.7469451427459717 -0.0000962029516813
+-0.1208027452230453 0.7469451427459717 -0.0217297878116369
+-0.1287211626768112 0.7469451427459717 -0.0512818172574043
+-0.1208027452230453 0.7469451427459717 -0.0808338448405266
+-0.0991691574454308 0.7469451427459717 -0.1024674326181412
+-0.0696171447634697 0.7469451427459717 -0.1103858947753906
+0.0104355672374368 0.7469451427459717 -0.0512818209826946
+0.0183540079742670 0.7469451427459717 -0.0217297952622175
+0.0399875976145267 0.7469451427459717 -0.0000962029516813
+0.0695396289229393 0.7469451427459717 0.0078222369775176
+0.0990916565060616 0.7469451427459717 -0.0000962029516813
+0.1207252666354179 0.7469451427459717 -0.0217297878116369
+0.1286436915397644 0.7469451427459717 -0.0512818172574043
+0.1207252666354179 0.7469451427459717 -0.0808338448405266
+0.0990916714072227 0.7469451427459717 -0.1024674326181412
+0.0695396587252617 0.7469451427459717 -0.1103858947753906
+0.0399876236915588 0.7469451427459717 -0.1024674549698830
+0.0183540340512991 0.7469451427459717 -0.0808338895440102
+-0.0400651134550571 0.7469451427459717 -0.1024674549698830
+-0.0184315238147974 0.7469451427459717 -0.0808338895440102
+-0.0000387450963899 0.7469451427459717 0.1539593935012817
+0.0295132827013731 0.7469451427459717 0.1460409313440323
+0.0511468648910522 0.7469451427459717 0.1244073510169983
+0.0590653121471405 0.7469451427459717 0.0948553308844566
+0.0511468723416328 0.7469451427459717 0.0653033033013344
+0.0295132957398891 0.7469451427459717 0.0436697266995907
+-0.0000387450963899 0.7469451427459717 0.0357512533664703
+-0.0295907724648714 0.7469451427459717 0.1460409313440323
+-0.0512243546545506 0.7469451427459717 0.1244073510169983
+0.1986573636531830 -0.5373616218566895 -0.0507182702422142
+0.1986573636531830 0.7521815299987793 -0.0507182702422142
+0.6378207802772522 0.7521815299987793 -0.0815882310271263
+0.6361915469169617 0.7521815299987793 -0.0507182702422142
+-0.0591428019106388 0.7469451427459717 0.0948553308844566
+0.0185033846646547 0.7521815299987793 0.2210596650838852
+-0.0512243621051311 0.7469451427459717 0.0653033033013344
+-0.0295907855033875 0.7469451427459717 0.0436697266995907
+0.0185033846646547 0.4187007546424866 0.2210596650838852
+0.0185033846646547 0.7521815299987793 0.4184791445732117
+-0.0000387450963899 0.7521815299987793 -0.1941412389278412
+-0.0000387450963899 0.7521816492080688 -0.1546941250562668
+-0.1987348496913910 -0.5373616218566895 -0.0507182702422142
+-0.1987348496913910 0.7521815299987793 -0.0507182702422142
+-0.6378982663154602 0.7521815299987793 -0.0815882310271263
+-0.6362690329551697 0.7521815299987793 -0.0507182702422142
+-0.0185808744281530 0.7521815299987793 0.2210596650838852
+-0.0185808744281530 0.4187007546424866 0.2210596650838852
+-0.0185808744281530 0.7521815299987793 0.4184791445732117
+-0.1220196112990379 -0.7704964280128479 0.0578973665833473
+-0.1389486789703369 -0.6539289951324463 0.1117897257208824
+-0.0496223382651806 -0.6539289951324463 0.1583083868026733
+-0.0435795448720455 -0.7704964280128479 0.0955571085214615
+0.1219421327114105 -0.7704964280128479 0.0578973665833473
+0.1388712078332901 -0.6539289951324463 0.1117897257208824
+0.0495448485016823 -0.6539289951324463 0.1583083868026733
+0.0435020551085472 -0.7704964280128479 0.0955571085214615
+4 5 4 14 15
+4 152 153 12 2
+3 152 155 153
+4 140 5 15 141
+5 18 30 29 7 17
+4 7 6 16 17
+4 4 3 13 14
+5 21 20 9 32 33
+4 2 12 11 1
+6 4 5 27 26 163 164
+4 8 31 32 9
+6 1 160 159 23 24 2
+5 5 140 6 28 27
+5 150 21 33 30 18
+4 6 7 29 28
+4 166 163 26 25
+4 162 22 23 159
+4 9 20 19 8
+4 27 28 40 39
+3 46 34 37
+3 43 46 44
+4 28 29 41 40
+4 25 26 38 37
+4 24 36 43 31
+4 29 30 42 41
+4 26 27 39 38
+3 44 46 45
+4 32 44 45 33
+3 39 40 46
+3 34 46 35
+3 40 41 46
+3 37 38 46
+4 48 60 59 47
+3 41 42 46
+3 38 39 46
+3 35 46 36
+4 23 35 36 24
+3 36 46 43
+8 0 10 156 157 148 145 13 3
+5 66 70 58 151 54
+4 50 49 61 62
+4 165 161 0 3
+4 58 70 69 57
+4 54 53 65 66
+4 51 50 62 63
+5 61 59 95 97 98
+4 52 51 63 64
+4 55 67 60 48
+4 57 69 68 56
+4 53 52 64 65
+4 72 108 107 71
+12 131 138 139 144 146 147 137 136 135 134 133 132
+4 71 107 130 82
+4 80 116 115 79
+4 84 83 117 118
+12 108 109 110 111 112 113 114 115 116 129 130 107
+4 84 85 119 118
+4 96 139 138 95
+4 98 97 131 132
+4 86 85 119 120
+4 75 111 110 74
+4 99 98 132 133
+4 87 86 120 121
+4 104 144 139 96
+4 100 99 133 134
+4 88 87 121 122
+4 76 112 111 75
+4 101 100 134 135
+4 89 88 122 123
+4 105 146 144 104
+4 102 101 135 136
+4 90 89 123 124
+4 77 113 112 76
+4 102 103 137 136
+4 91 90 124 125
+4 106 147 146 105
+4 92 91 125 126
+4 78 114 113 77
+3 19 154 8
+4 93 92 126 127
+4 106 147 137 103
+4 94 93 127 128
+4 79 115 114 78
+4 83 94 128 117
+4 81 129 116 80
+4 82 130 129 81
+12 118 117 128 127 126 125 124 123 122 121 120 119
+4 47 59 61 49
+4 74 110 109 73
+3 16 6 142
+4 6 140 143 142
+3 140 141 143
+46 69 70 66 65 64 63 62 61 98 99 100 101 102 85 86 87 88 89 90 91 92 93 94 83 84 72 71 82 81 80 79 78 77 76 75 74 73 106 105 104 96 95 59 60 67 68
+3 156 158 157
+3 145 148 149
+4 8 154 155 152
+4 95 138 131 97
+7 84 72 73 106 103 102 85
+4 72 108 109 73
+4 56 68 67 55
+4 157 158 149 148
+4 31 43 44 32
+3 45 46 42
+4 22 34 35 23
+8 145 149 158 156 10 47 49 13
+5 2 24 31 8 152
+4 1 11 10 0
+4 37 34 22 25
+4 33 45 42 30
+4 25 22 162 166
+8 165 164 163 166 162 159 160 161
+4 0 161 160 1
+4 3 4 164 165
+17 10 11 12 153 155 154 19 20 21 150 151 58 57 56 55 48 47
+17 13 49 50 51 52 53 54 151 150 18 17 16 142 143 141 15 14
diff --git a/samples/99_genre_3d/02_wireframe/data/what-is-this.txt b/samples/99_genre_3d/02_wireframe/data/what-is-this.txt
new file mode 100644
index 0000000..2b14e34
--- /dev/null
+++ b/samples/99_genre_3d/02_wireframe/data/what-is-this.txt
@@ -0,0 +1 @@
+https://en.wikipedia.org/wiki/OFF_(file_format) \ No newline at end of file