Search Results - VBForums

Search:

Type: Posts; User: jemidiah

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds; generated 49 minute(s) ago.

  1. Replies
    12
    Views
    271

    Re: [RESOLVED] Rise/Run to Angle

    That's wonderful, glad to be helpful in sparking some interest in math.
  2. Replies
    3
    Views
    95

    Re: The maximum number of divisors

    Let D(n) denote the number of divisors of n. Our first goal is to show D is "multiplicative". That is, suppose n and m are relatively prime. We'll show D(nm) = D(n)D(m).

    If d divides n and d'...
  3. Re: [C#] Finding angles based on side lengths

    Yup, that's true. Edit: though to be completely clear, you can also compute the other two angles from that information. The largest angle isn't privileged in any way.



    Yeah, it should clarify...
  4. Re: [C#] Finding angles based on side lengths

    As I understand it, you (at the moment) want to compute the angle with vertex in the middle of the red rectangle, with the black line and one of the pink lines forming the rays. In that case, I don't...
  5. Re: [RESOLVED] calculating maximum distinct char permutations

    Yup, that's what I mean. Sorry, I totally forgot I used the factorial notation without defining it. For a more thorough example of my formula, if you have R, R, R, R, G, G, G, B, Y, the answer is
    ...
  6. Re: calculating maximum distinct char permutations

    This is a classic problem with a conveniently straightforward solution. Using R, G, B, Y, R, first replace the second R with R'. There are 5! = 120 ways to permute those five characters, but really...
  7. Replies
    12
    Views
    271

    Re: [RESOLVED] Rise/Run to Angle

    Heh, glad some of it is clicking.
  8. Replies
    12
    Views
    271

    Re: [RESOLVED] Rise/Run to Angle

    Roughly speaking, you can define sin and cos to be the correct functions to use in your GetRiseRunFromAngle function, subject to the constraint that the resulting vector has length 1. That is,...
  9. Replies
    12
    Views
    271

    Re: [RESOLVED] Rise/Run to Angle

    A relatively minor point: it's probably best to use "New PointF(Math.Cos(radians), Math.Sin(radians))" instead of "New PointF(1, tangent)". The direction will be unaffected, but the benefits are: (1)...
  10. Replies
    12
    Views
    271

    Re: Rise/Run to Angle

    Converting a 2D vector to an angle is precisely the job of the atan2 function. There's a lengthy Wikipedia page about it and it's in a large number of libraries. Note there are a couple of common...
  11. Replies
    2
    Views
    252

    Re: Book about Pattern Recognition

    After some searching, I found this random Spanish-language page that seems to sell it. Failing that, I was going to suggest you contact the author directly, but I didn't find an email address or...
  12. Re: Generating rectangles around a centre point in a spiral starting from the centre

    For what it's worth, here's a brief discussion of what Lenggries called "GetX/GetY".

    Divide the plane into rectangular strips: the 0th is just (0, 0); the 1st is (0, 1), (1, 1), (1, 0), (1, -1),...
  13. Replies
    8
    Views
    332

    Re: Get X/Y coordinates

    What you're trying to do and what's not working aren't terribly clear to me, but are you sure you wanted


    Dim tilesPerHeight As Double = Math.Floor(Me.Height + ToolStrip1.Bottom / 32)

    instead...
  14. Thread: Prove this

    by jemidiah
    Replies
    2
    Views
    263

    Re: Prove this

    Multiply x<1 by x. Since 0<x, this does not reverse the inequalities, so we have 0 < x^2 < x. Take the square root of these inequalities to get 0 < sqrt(x^2) = x < sqrt(x).

    The first two sentences...
  15. Replies
    9
    Views
    948

    Re: Combination Picker

    I agree, the question is exactly asking for an efficient algorithm to unrank an index to produce a k-combination. I imagine there's a fair amount of literature on the problem and its generalizations,...
  16. Re: drawing the Steiner exellipse

    That's beautiful and it seems reasonably intuitive. Glad it worked out. Sorry I never got to debugging your earlier post; life got too busy for me to put in the time and effort.
  17. Re: Plot ellipse through apex and two other points

    Sorry for not getting to this. I came down with the flu for the last week and am now playing catch-up. Hopefully soon.
  18. Re: Plot ellipse through apex and two other points

    I'll try to take a look in the next couple of days.
  19. Re: Plot ellipse through apex and two other points

    @Logophobic: Yup. I think bb and I both observed that somewhere above; the working version of the code discussed in post #14 makes it clear empirically. Here's a proof using my formula from post #8....
  20. Re: Plot ellipse through apex and two other points

    Whoops, the cross term is more complicated than just a simple complete-the-square problem. Noting that
    A(x-D/(2A))^2 = Ax^2 - Dx + D^2/(4A)
    A(y-E/(2C))^2 = Ay^2 - Ey + E^2/(4C)

    will get rid of...
  21. Re: Plot ellipse through apex and two other points

    Ah, sorry, I should have explained my notation more explicitly. A, B, C, D, E, and F are all parameters to the general quadratic curve equation,
    Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0,

    listed on the...
  22. Re: Plot ellipse through apex and two other points

    Hmm. I think your problem is still underdetermined. I'll give a system of equations that describe your conditions and then have Mathematica solve them. This shows there is a single free parameter, so...
  23. Re: Plot ellipse through apex and two other points

    I don't think the constraint you've said makes complete sense. You want P2 to be as far as possible perpendicularly from line P1P3 (typo), but on "the arc": you're using this constraint to define...
  24. Re: Plot ellipse through apex and two other points

    In the "normalized" form of post #6, a configuration with the line from P1 to P3 perpendicular to the axis from P2 corresponds to P2=(0, 0), P1=(u, v), P3=(u, -v), i.e. u=r, v=-s. Indeed, then us^2 -...
  25. Re: Plot ellipse through apex and two other points

    I wrote (0, A) when I meant (A, 0), so "Dim centre As New PointF(0, A)" should be "Dim centre As New PointF(A, 0)". With that change, when the line connecting P2 and m is horizontal, it generally...
  26. Re: Plot ellipse through apex and two other points

    After looking through the code, it's a faithful implementation (thanks for correcting the typo) except you've reversed the order of the arguments to atan2. Instead of "Dim t As Double =...
  27. Replies
    14
    Views
    534

    Re: Drawing Sine and Cosine Graphs on vb10

    Sorry, you'll have to be clearer if you want people to help you. Three things you can do: use [CODE] tags; post your full code rather than seemingly arbitrary fragments; say *clearly* what you want...
  28. Re: Plot ellipse through apex and two other points

    Actually it means exactly the opposite: given u, v, r, s, there is a unique solution A, B^2 to the system of two equations I listed, which can be computed using the formulas I gave. Physically, that...
  29. Replies
    14
    Views
    534

    Re: Drawing Sine and Cosine Graphs on vb10

    (The way I remember the conversion is that there are 2pi radians in 360 degrees, so X degrees = X degrees * 2pi radians/360 degrees = X*pi/180 radians.)
  30. Re: Plot ellipse through apex and two other points

    Translate the points so P2 is at the origin. Suppose you wish to make an ellipse with center (0, A). The resulting ellipse is
    ((x-A)/A)^2 + (y/B)^2 = 1,

    for some B^2>0. Let P1=(u, v), P3=(r, s),...
  31. Replies
    14
    Views
    534

    Re: Drawing Sine and Cosine Graphs on vb10

    This isn't really a math question, you just happen to be coding something related to math. I've reported the thread so that it should get moved to the more appropriate VB.NET forum. More people will...
  32. Replies
    10
    Views
    332

    Re: Problem regarding convertion of number...

    Hah, that... is disgusting. I would never want to run across it without having written it :).
  33. Replies
    4
    Views
    613

    Re: Random number question

    For completeness, a general method for this sort of problem is described here. It's almost certainly way more involved than you're after.
  34. Replies
    10
    Views
    332

    Re: Problem regarding convertion of number...

    Sure. It was so straightforward to write that line but now that I'm writing an explanation it seems more involved. There must be a better way to say it, but oh well.

    Log(x, b) returns the number y...
  35. Replies
    10
    Views
    332

    Re: Problem regarding convertion of number...

    There's quite a lot wrong with that code. It didn't compile for me at first (needed .ToString() instead of .ToString? kinda weird), but more importantly it's inefficient, overcomplicated, and doesn't...
  36. Re: What point on the graph of f(x) is closest to the origin?

    I don't think so. I did look at the graph, and +/- sqrt(2) seems very reasonable to me. It's hard to eyeball, unfortunately. Make sure you're looking at it on a graph where the x and y axes have the...
  37. Re: What point on the graph of f(x) is closest to the origin?

    Points on the graph are (x, 5/2 - x^2), which has a squared distance from the origin of x^2 + (5/2 - x^2)^2 = x^4 - 4x^2 + 25/4. To minimize, the derivative is 4x^3 - 8x = 4x(x^2 - 2), which has...
  38. Re: how to convert binary numbers into decimals or numbers to decimals [HELP]

    You'll have to be more specific. Give some examples of problems you want to solve but don't know how.
  39. Re: Reducing numbers to one digit (numerology related)

    For what it's worth, this thread seems to have no actual math questions--it's all about coding basic operations on digits and letters. A more appropriate place for this type of post is probably the...
  40. Replies
    10
    Views
    860

    Re: Prime Numbers

    For what it's worth, the number of distinct results mod n of numbers relatively prime to n is called Euler's totient function phi(n) (Google if interested). It turns out to be really easy to compute...
Results 1 to 40 of 496
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.