This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2017 Niklas Rosenstein | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vec2 cmpxcjg(in vec2 c) { | |
return vec2(c.x, -c.y); | |
} | |
vec2 cmpxmul(in vec2 a, in vec2 b) { | |
return vec2(a.x * b.x - a.y * b.y, a.y * b.x + a.x * b.y); | |
} | |
vec2 cmpxpow(in vec2 c, int p) { | |
for (int i = 0; i < p; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/nodepy | |
choices = { | |
'S': range(1, 10), | |
'L': range(1, 5), | |
'V': range(1, 5), | |
'H': range(1, 4), | |
'R': range(1, 4), | |
'E': range(1, 4), | |
'C': range(1, 9), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import c4d | |
def calc_line_plane_intersection(o, d, a, n): | |
""" | |
Calculates the intersection of the line described by *o* and *d* | |
with the plane described by *a* and *n*. | |
""" | |
dot = d.Dot(n) | |
if abs(dot) < 1.0e-7: return None # parallel to plane |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extract the Cinema 4D SDK from a Cinema 4D installation. | |
# Copyright (C) 2016 Niklas Rosenstein | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONTAINER OoffsetYSpline { | |
INCLUDE Obase; | |
GROUP ID_OBJECTPROPERTIES { | |
REAL PY_OFFSETYSPLINE_OFFSET { UNIT METER; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# py-require-0.17-b64-79 | |
import base64 as b, types as t, zlib as z; m=t.ModuleType('require'); blob=b'\ | |
eJytGU1v7Lbxvr9CdQ6SnlXZTg4FnCgIGrwCOfQ9oH23xULQailbsSSqpPS8RtD/3pnhkCK1WhdBctn\ | |
lx3A43x9UWVbz9CxVWRbxp/alq3T0L6nFoCfRDtEPyo0H2kyqKX3qq7bLa9n/GO/K8qtQupUDnr/PH/\ | |
4W79p+lGqKhFKDtJN2EmqSstN2oa+Ufq46O5VuY5S6PY/V9GwXprdRuF39pncn0USDVD0CJef0cRcpM\ | |
c1qACQ5ruVu0y5UR83A6a4GJoBF8Z+5VeKjUlIlvxBuGiO2EQBCsH/K09yJn+UwifOUyOOvop4QEikp\ | |
y3Zop7JMtOiaDK/JlOhkdcrqStfVSWTtMHZVLewc4E/iDJBKDIQlwpNEaNG1ekpwlNplg6swf3aRMRX\ | |
8H7VNZAAi0WkR/aOCXwvLtxf8/y5sQGERzBYykezC/O2in0YlR1DtmxEGkl5WXUfCIN6U0HM3FfsDjF\ | |
+f204QGtzhrbwaRzGcEicEZJ2ACu9CwkRKdpaU189VOyQfDJqVYhOymtwo7guMkRiBGi581V9TYZGk2\ | |
auCq8rj2yRqCbL+JAeRlS9CjMBg+9Uu6KmqX05ihDP3RpkzyCPhSzKSQ+4uiJVZj51+CX9VP4tSz03T\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2016 Niklas Rosenstein | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2016 Niklas Rosenstein | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2014, Niklas Rosenstein | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |