diff --git a/260302-GrayScale.toe b/260302-GrayScale.toe new file mode 100644 index 0000000..c873d49 Binary files /dev/null and b/260302-GrayScale.toe differ diff --git a/dat_table_json__td_7768_7.tsv b/dat_table_json__td_7768_7.tsv index ec2b6e9..893222e 100644 --- a/dat_table_json__td_7768_7.tsv +++ b/dat_table_json__td_7768_7.tsv @@ -1,51 +1,51 @@ text group center_x center_y center_z axis_x axis_y axis_z radius -都是社畜 0 0 0.6962825031877081 0 0 1 0 1.6714939670853746 -你哪來的學貸? 1 0 0.05914184526204703 0 0 1 0 1.8465596046232762 -你哪來的學貸? 1 0 0.5136159806263464 0 0 1 0 1.7194848370727036 -最近也考慮買一間 1 0 1.5811531057640902 0 0 1 0 1.372871124274302 -我買170 1 0 0.9688057862434363 0 0 1 0 1.1523216147696012 -?牛逼 0 0 0.017484015859790647 0 0 1 0 1.7187023947584603 -如果隔壁現在開一倍 1 0 1.0213032000565736 0 0 1 0 1.2523423169715886 -這肯定不是最近的 1 0 1.429626208777401 0 0 1 0 1.6394332878372082 -公主要貸款? 1 0 0.1156156424384032 0 0 1 0 1.6925402334841968 -無法同意您更多~ 1 0 -0.9500637165356891 0 0 1 0 1.5210588927763076 -邊讀邊還 1 0 -0.3262641960827861 0 0 1 0 1.8745174930501658 -大家看不懂 3 0 0.7212183742924029 0 0 1 0 1.7873204093200437 -請各位用低收入戶稱呼 2 0 1.3146568715329203 0 0 1 0 1.5766896128386911 -商家老闆再次 請慢用 1 0 0.11691440639810258 0 0 1 0 1.2871339107669462 -學貸晚點還沒關係 1 0 0.007282554580761061 0 0 1 0 1.9040692076679249 -真的嗎 1 0 1.3044799015925659 0 0 1 0 1.6660197765363085 -幸運的我 接下來就是開始房貸人生 1 0 1.719225499097717 0 0 1 0 1.5297794915958463 -來玩ㄇ 1 0 0.014134226661262517 0 0 1 0 1.178740116435868 -公司幫妳付房貸 1 0 1.611754072814844 0 0 1 0 1.4272035944465569 -鎖留言我回不了喔 2 0 0.47279546733333855 0 0 1 0 1.7208698842245278 -努力脫離社畜人生 0 0 0.47346348577948255 0 0 1 0 1.7852449262532069 -我貸款也要去租 1 0 1.3530816292221408 0 0 1 0 1.3880444777994656 -請慢用~ 1 0 0.14681305210655277 0 0 1 0 1.2616441023072558 -@ariki_fudo66 2 0 0.36374882090584437 0 0 1 0 1.7836733199341155 -學費了嗎 1 0 0.04457170041020015 0 0 1 0 1.6722879864149556 -最近貸款通過的朋友 1 0 1.5910852292414535 0 0 1 0 1.602086243406167 -超值! 1 0 0.7273739740118208 0 0 1 0 1.1898552674091176 -爹地們都付清了 1 0 0.14674468891252168 0 0 1 0 1.8248270195092404 -別把負債想的太可怕 1 0 0.2761550309146475 0 0 1 0 1.7264722553451133 -介面超難用 2 0 0.048266931416564685 0 0 1 0 1.892308458486497 -你家超美欸!! 1 0 0.4663087009094571 0 0 1 0 1.1709673230337219 -請問您使用5的couesera 1 0 -0.23352328680297685 0 0 1 0 1.4949725664272975 -連結: skills.google 3 0 -0.28013329486407956 0 0 1 0 1.8614341209965644 -我需要粉羊,謝謝 0 0 -0.04195244906109041 0 0 1 0 1.7904265542542563 -有變好貸嗎? 1 0 1.678465735272634 0 0 1 0 1.5648969069807728 -這個地點我可以 1 0 0.9947285142351023 0 0 1 0 1.3630487854824989 -請慢用~ 1 0 0.39343419424309634 0 0 1 0 1.3043643389283763 -申請學貸去投資 1 0 0.4833880801530185 0 0 1 0 1.8080951964445242 -@yi_yun118 1 0 1.4634422071399011 0 0 1 0 1.5595704532482633 - 1 0 -0.5119413944495008 0 0 1 0 1.5841404141651785 -不一定付房貸車貸 1 0 0.45821336100400173 0 0 1 0 1.5754493507341427 -繳房貸車貸 1 0 0.6267551384381608 0 0 1 0 1.7011389400547856 -幸運的我 接下來就是開始房貸人生 1 0 1.306069205995524 0 0 1 0 1.6352919127475323 -附上網頁連結 2 0 0.28935290171536665 0 0 1 0 1.8103169351076183 -有缺,可以 IG 私訊~ 3 0 0.01724175381483317 0 0 1 0 1.6808701386561142 -卡 1 0 0.7381162431061481 0 0 1 0 1.4005930087095702 -申請學貸會很麻煩嗎? 1 0 0.6664359513023517 0 0 1 0 1.770179787468429 -會考根本不到比天賦 3 0 0.5195366611592229 0 0 1 0 1.8354789265265263 -利率條件都是看個人的狀況 1 0 1.4900486215283553 0 0 1 0 1.6124392850806382 -有保證付多少年嗎 1 0 1.6135016954575825 0 0 1 0 1.4852775179868263 +可惜台灣用不太到QQ 1 0 0.6905958432373129 0 0 1 0 1.664205416921829 +職涯順風順水 1 0 0.5945182083768348 0 0 1 0 1.7503317801588716 +一定程度的冷漠真的有用 1 0 0.6363852265441814 0 0 1 0 1.786820807456977 +商業模式根本不對 1 0 -1.0776103611552283 0 0 1 0 1.6336823128254074 +別怕!這份教程是作戰地圖! 1 0 0.5349215672726899 0 0 1 0 1.6396526017220707 +領多少錢做多少事 1 0 -0.6939311360713685 0 0 1 0 1.7073797878831671 +github.com/jwash… 3 0 0.15924904733958023 0 0 1 0 1.73483796481498 +主動個雞巴? 1 0 -0.705495719949635 0 0 1 0 1.779842555658018 +privilege要幫忙翻譯一下 3 0 -0.03304633674829205 0 0 1 0 1.8131102586167758 +開介紹卡之前 0 0 -1.3534596409424422 0 0 1 0 0.8372964385874244 +偶爾遲到就算 0 0 -0.5106364101706644 0 0 1 0 1.7927774826705403 +資源自己找 1 0 -0.8379488497691767 0 0 1 0 1.771538719495661 +00後會先被賤人老鳥Pua 1 0 0.41707617505012085 0 0 1 0 1.811186688516742 +錯誤全轉嫁在你身上 1 0 -0.7665247084694791 0 0 1 0 1.7530885906919371 +還會情勒和PUA同事 1 0 0.3545863565657834 0 0 1 0 1.7428065316090524 +把所有對話紀錄挖出來 1 0 -1.131634876423071 0 0 1 0 1.6843165022270539 +當閒魚也是可以很快樂的 1 0 -0.8156849652883658 0 0 1 0 1.7157552829546436 +每天通勤時間大概要三個小時 1 0 0.49990377736317093 0 0 1 0 1.8397358789203468 +下班前補回去 0 0 -0.2366144184492711 0 0 1 0 1.9077590480086162 +要被收割的時候 1 0 -0.4372013766040439 0 0 1 0 1.7904017938766612 +不要來鬧事。 2 0 0.4101263232061987 0 0 1 0 1.8481148883854037 +身體要顧啦 1 0 -1.0322667795909144 0 0 1 0 1.6747544510474919 +遲到一秒不行 0 0 -0.6977490092633287 0 0 1 0 1.8059257542942622 +有買就先贏3/2了 0 0 -1.9112742206205153 0 0 1 0 0.8364164053274359 +有緩衝時間 3 0 1.4430095465105417 0 0 1 0 1.1121087115403885 +不能是常態 0 0 -0.9116589934210015 0 0 1 0 1.7489934360780455 +隔天自暴自棄在面試時說故事 1 0 0.7590324187276414 0 0 1 0 1.6448497724911568 +主管們要開始為他們的行為付出代價 1 0 0.0002696626847491501 0 0 1 0 1.8524346778318221 +加班沒半小時不能報 3 0 1.4382632883151532 0 0 1 0 1.1543990781523896 +往前約半小時 0 0 -0.6322755709271091 0 0 1 0 1.8385121640405053 +就老梗....... 3 0 -2.434185213942704 0 0 1 0 1.0381255215846075 +開介紹卡之前 3 0 0.2834062342327073 0 0 1 0 1.6180517869619688 +規則自己訂,好玩就好! 0 0 -1.9866813219876631 0 0 1 0 0.9379743006104484 +大家看不懂 2 0 -0.23429747878040974 0 0 1 0 1.8811582060415817 +現在的教育現場就是最大型PUA 1 0 -0.3775259913410203 0 0 1 0 1.8877739982506667 +多益800多分跑外送沒關係 3 0 0.3262304890122749 0 0 1 0 1.7355604239437241 +沒遲到過 0 0 -0.31668407987325153 0 0 1 0 1.8889371264976191 +挑戰報過加班11分鐘 0 0 -0.732109754354596 0 0 1 0 1.7762649257943746 +補助超難拿 3 0 0.23003473561113097 0 0 1 0 1.652847386400917 +要拿出你的價值🙂 1 0 -0.784263529564786 0 0 1 0 1.730662062543395 +彈性09:15前到 0 0 -0.2371033835006493 0 0 1 0 1.9072859543280607 +@_w._ting_35 2 0 -0.037432694788019916 0 0 1 0 1.6463761950115465 +幫他拖住客戶 3 0 0.9548853401052124 0 0 1 0 1.1813350301215764 +大家都是我的復仇者聯盟。 1 0 0.6830608229113517 0 0 1 0 1.5731328340944273 +他怎麼不封鎖你啊笑死 2 0 -0.442510746476219 0 0 1 0 1.5738320037827067 +努力夠再靠北獵豹 3 0 0.7968403501561356 0 0 1 0 1.7754634960551492 +做多沒領多 3 0 0.7672707565858987 0 0 1 0 1.7659053098048623 +請各位用低收入戶稱呼 3 0 0.18363282496609745 0 0 1 0 1.936758946481532 +老闆也不知道要做什麼? 3 0 -2.0549381020096407 0 0 1 0 1.0636034439748396 +這樣算嗎 3 0 1.1282119080844941 0 0 1 0 1.6689018574134176 diff --git a/dat_table_keyword__td_7768_6.tsv b/dat_table_keyword__td_7768_6.tsv index 9a5a922..f1e6f82 100644 --- a/dat_table_keyword__td_7768_6.tsv +++ b/dat_table_keyword__td_7768_6.tsv @@ -1,5 +1,5 @@ id text tx ty tz group -9 社畜 2.789979628407826 -0.6499819459347258 -0.3998201781922655 0 -3 學貸 4.739172229003794 0.03459650711282825 1.0354015996451778 1 -15 主體 3.2390253694560833 -1.4253868510025078 0.09137613908937205 2 -10 邊界 3.753966372048065 -0.8370512387023024 -0.8362932438104684 3 +10 邊界 7.049524932949754 -6.439100522818256 -7.751959943601179 2 +8 潛規則 5.1083424781674385 -5.309494944891831 -8.996183670350664 0 +7 PUA 10.607224928578457 -8.32110016849768 -7.488116362065072 1 +1 窮忙 7.792775957089157 -7.187700548963291 -7.483805364078902 3 diff --git a/dat_table_lookat__td_24460_1.tsv b/dat_table_lookat__td_24460_1.tsv index f4f15e9..0ba56a6 100644 --- a/dat_table_lookat__td_24460_1.tsv +++ b/dat_table_lookat__td_24460_1.tsv @@ -1,2 +1,2 @@ id text updateTime -3 Student Loans 1770903911 +8 Unwritten Rules 1772697583 diff --git a/osc_points.toe b/osc_points.toe index 9ec8e19..1cffb5a 100644 Binary files a/osc_points.toe and b/osc_points.toe differ diff --git a/text_to_arc_script.py b/text_to_arc_script.py new file mode 100644 index 0000000..21b2fb0 --- /dev/null +++ b/text_to_arc_script.py @@ -0,0 +1,146 @@ +import math +# me - this DAT +# scriptOp - the OP which is cooking +# +# press 'Setup Parameters' in the OP to call this function to re-create the parameters. +def onSetupParameters(scriptOp): + page = scriptOp.appendCustomPage('Custom') + page.appendFloat('Valuea', label='Value A') + page.appendFloat('Valueb', label='Value B') + return +def onCook(scriptOp): + scriptOp.clear() + # Define Table Header with position and rotation columns + scriptOp.appendRow(['text', 'P(X)', 'P(Y)', 'P(Z)', 'R(X)', 'R(Y)', 'R(Z)']) + + # --- Fetch External Parameters --- + const_op = op('constant1') + if not const_op: + return + + radius_scale = const_op['ring_scale'] + rotate_speed = const_op['rotate_speed'] + # text_space: used to define the angular gap between characters + text_space = const_op['text_space'] + arc_table = op('arc_table') + + if arc_table: + arc_table.clear() + arc_table.appendRow(['tx', 'ty', 'tz','rx', 'ry', 'rz','scale']) + + for source in scriptOp.inputs: + # Safety check: Input must exist and have at least a header and one data row + if not source or source.numRows < 2: + continue + + # Iterate through the rows of the source DAT + for i, row in enumerate(source.rows()[1:]): + + full_string = row[0].val + + if not full_string: + continue + + str_len = len(full_string) + + # Fetch speed variation from the speed_variation CHOP + speed_op = op('speed_variation') + speed_variation = speed_op[0][i] if speed_op and i < speed_op.numSamples else 0 + + # Calculate time-based rotation offset (in radians) + time_offset = absTime.seconds * rotate_speed *(1.0+ abs(speed_variation))/10.0 + + try: + center = [op('scaled_positions')[0][i], op('scaled_positions')[1][i], op('scaled_positions')[2][i]] + axis = [float(row[5]), float(row[6]), float(row[7])] + radius = float(row[8]) * radius_scale + except (ValueError, TypeError, IndexError): + continue + # --- Calculate Orthogonal Basis for the Ring Plane --- + ax, ay, az = axis + mag = math.sqrt(ax*ax + ay*ay + az*az) + if mag == 0: + ax, ay, az = 0, 1, 0 + else: + ax, ay, az = ax/mag, ay/mag, az/mag + if abs(ax) < 0.9: + tx, ty, tz = 1, 0, 0 + else: + tx, ty, tz = 0, 1, 0 + + ux = ay*tz - az*ty + uy = az*tx - ax*tz + uz = ax*ty - ay*tx + umag = math.sqrt(ux*ux + uy*uy + uz*uz) + ux, uy, uz = ux/umag, uy/umag, uz/umag + + vx = ay*uz - az*uy + vy = az*ux - ax*uz + vz = ax*uy - ay*ux + # --- Calculate Arc Logic --- + # Instead of forcing (i/str_len)*2*pi, we use text_space to determine the gap. + # If the total arc (gap * characters) < 2*pi, it remains an arc. + angular_step = text_space / (radius if radius > 0 else 1) + # angular_step = radius*math.pi*2.0/text_space if radius>0 else math.pi*2.0/str_len + total= math.floor(math.pi*2.0/(angular_step)) + count=0 + print(f"Processing string with length {str_len}, total positions: {total}") + # Build the table character by character + while count 0: + nx, ny, nz = off_x/dist, off_y/dist, off_z/dist + else: + nx, ny, nz = 0, 0, 1 + + char_ry = math.degrees(math.atan2(nx, nz)) + char_rx = math.degrees(math.asin(-ny)) + 90 + char_rz = 0 + + tan_x = (ux * -math.sin(angle)) + (vx * math.cos(angle)) + tan_y = (uy * -math.sin(angle)) + (vy * math.cos(angle)) + tan_z = (uz * -math.sin(angle)) + (vz * math.cos(angle)) + + line_ry = math.degrees(math.atan2(tan_x, tan_z)) - 90 + line_rx = math.degrees(math.asin(-tan_y)) + + # ry = math.degrees(math.atan2(nx, nz)) + # rx = math.degrees(math.asin(-ny))-90 + # rz = 0 + + if count>=str_len: + scale= radius*angular_step if radius>0 else 1 + arc_table.appendRow([px, py, pz, line_rx, line_ry, 0, scale/2]) + # scriptOp.appendRow(['-', px, py, pz, char_rx, char_ry, 0]) + else: + char = full_string[count] + scriptOp.appendRow([char, px, py, pz, char_rx, char_ry, 0]) + # arc_table.appendRow([px, py, pz, rx, ry, rz, 1.0]) + + count+=1 + + + + return +def onGetCookLevel(scriptOp): + return CookLevel.ALWAYS \ No newline at end of file