2023-10-23 10:20:18 +0100 | received badge | ● Famous Question (source) |
2022-12-31 15:24:38 +0100 | received badge | ● Notable Question (source) |
2022-05-24 16:37:00 +0100 | received badge | ● Notable Question (source) |
2022-02-18 06:37:14 +0100 | received badge | ● Popular Question (source) |
2021-12-25 14:44:21 +0100 | received badge | ● Famous Question (source) |
2021-03-27 21:17:42 +0100 | received badge | ● Popular Question (source) |
2020-12-23 00:20:32 +0100 | received badge | ● Notable Question (source) |
2020-12-23 00:20:32 +0100 | received badge | ● Popular Question (source) |
2020-01-15 15:47:15 +0100 | commented answer | how to get y component of bezier control points? then you use sage to solve $E_0$ and $E_1$ for the control points with then so what are these |
2020-01-15 15:45:06 +0100 | commented answer | how to get y component of bezier control points? expression for cubic bezier curve: $Bz = \sum_{u=0}^{v} Bn(v,u,t) $ = ${(-(t - 1)^3x_0 + 3(t - 1)^2tx_1 - 3(t - 1)t^2x_2 + t^3x_3 ) $, $(-(t - 1)^3y_0 + 3(t - 1)^2ty_1 - 3(t - 1)t^2y_2 + t^3y_3) }$. with the expression for its derivatives: $dBz = Bz'(t) = $ $ -3(t - 1)^2x_0 + 3(t - 1)^2x_1 + 6(t - 1)tx_1 - 6(t - 1)tx_2 - 3t^2x_2 + 3t^2x_3$, and $ -3(t - 1)^2y_0 + 3(t - 1)^2y_1 + 6(t - 1)ty_1 - 6(t - 1)ty_2 - 3t^2y_2 + 3t^2y_3$. with you use these identities to create these equations: $ dB_0 ... (more) |
2020-01-15 15:43:22 +0100 | commented answer | how to get y component of bezier control points? im trying to follow along with your code and im not sure where the input is supposed to be so i tried to read your code in english, let me express my understanding of what your suggesting and what im still confused by. so list an expression for the control points: $LP = [(x_0,y_0),(x_1,y_1),(x_2,y_2),(x_3,y_3)]$. with expression for bernstein basis polynomials: $Bn(p,j,t) = {p\choose j}*t^j * (1-t)^{p-j}$, t = [0,1]. with |
2020-01-11 03:37:34 +0100 | commented answer | how to get y component of bezier control points? thank you im studying your answer now |
2020-01-10 00:41:01 +0100 | commented question | how to get y component of bezier control points? @eric_g i did not see that documentation before but i will go through it also, @Emmanuel Charpentier thanks for that, I will upload my script shortly so you can see more where I am at |
2020-01-09 20:13:55 +0100 | commented question | how to get y component of bezier control points? @Emmanuel Charpentier if i were to substitute those coefficients into |
2020-01-09 20:12:18 +0100 | commented question | how to get y component of bezier control points? @Emmanuel Charpentier: yes, this is the reverse of the typical bezier problem. what I am doing is taking hand drawn curves that I ultimately need rendered in a browser. this curves are polynomials of various order. So I am taking the curves parameterzing them, and the parameterized curves are then the argument for the above |
2020-01-09 04:36:39 +0100 | asked a question | how to get y component of bezier control points? or is there a utility in im writing a program that takes a curve in polynomial form and returns those control points, this is the part in question: but the control points are coordinates, and this returns single numbers like coefficients. for example returns so how do i finish processing these portions of the control points? background the parts of the program i have written that i didnt share take the polynomial of arbitrary order, break it up into simpler subcurves, parameterize those subcurves, and those parameterized subcurves are the arguements of the |
2020-01-03 05:43:44 +0100 | commented answer | can sage return a list of numbers from solve() instead of expressions? yet better: |
2020-01-03 05:27:52 +0100 | commented answer | can sage return a list of numbers from solve() instead of expressions? this is how, |
2020-01-03 05:02:15 +0100 | commented answer | can sage return a list of numbers from solve() instead of expressions? how would the above work for multivariate functions? ive tried and and neither are valid syntax |
2019-12-29 07:02:07 +0100 | asked a question | can sage return a list of numbers from solve() instead of expressions? is there any builtin methods to have
instead of:
or if there are not any built in functions recommended approaches? this is in a sage script im rating that at this point in the program is taking polynomials, computing their first and second derivatives, and adding the roots of those derivatives to a list, which needs to be iterable. if there does not exist some sage method or options for this, i believe i would need to revert to regex, which feels like im doing something wrong if thats what im having to do here |
2019-12-23 19:34:15 +0100 | commented answer | can you programmatically define a [mathematical] function? i agree, theres polyfit from numpy i believe, which does interpolation to find equation of best fit but thats as close as ive found |
2019-12-23 19:34:15 +0100 | received badge | ● Commentator |
2019-12-19 14:38:55 +0100 | commented answer | can you programmatically define a [mathematical] function? when used in a script it looks like: i did not realize the summation function could be used without indices. thank you for your answer works very well |
2019-12-19 14:36:17 +0100 | commented answer | can you programmatically define a [mathematical] function? thank you for your additional answer, like the one above i did not know you could use the summation function without indices. |
2019-12-18 22:33:25 +0100 | asked a question | can you programmatically define a [mathematical] function? I want to take an array of coefficients and turn that into a function, a math function not a python function. for example take and turn this into $$f(x) = 2x^3 + 2x + 7$$ something like then call my definition in the script like But symbolicEqn is just a string and not an expression. Is there a sage/python way to do this? |
2019-12-08 18:49:37 +0100 | marked best answer | can't import sage into python trying to write a python/sage script and in starting i am following the example from this sage docs link and i continue to get the variety of erros:
and variations thereof. sage runs from any directory just by typing sage and enter, so i dont believe its a path issue. ive also tried passing the -python argument to the shebang at the top of the script. i have tried to execute the script using:
i have also tried saving the file with a .sage extension and invoking the script also as above, all of and any combinations complain of the same inability to resolve the module importing of sage into the script. i know there are a number of similar questions on this site related to that error, but they most all seemed to also have problems invoking sage successfully from the cl with just typing sage |