 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Patrick Dugan wrote:
>
> I would like any help someone can give regarding a math problem in Povray.
>
I didn't quite follow the source posted here and saw that your problem
is already solved but since I've been struggling with the exact same
things some time ago and only barely worked it out, by trial and error,
it struck me now that there might be a fairly simple solutions: drop the
rotation part!
Start with the bottom square (or box), move from the corner along the
side for a fixed percentage of the side length, do that for every side
(in the same direction). The four resulting points will form a new
square.
Put this in a recursive macro and there you go.
Toch? Jan?
Remco
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I'm unschooled in the field of traditional trigonomentry usage.... where
did you get the number 4.725?
None wrote:
> I think Reduce should simply be set to something like:
>
> #declare Reduce = X * tan(radians(4.725));
>
--
Samuel Benge
stb### [at] hotmail com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
The number wasn't significant. I simply testing various Z axis rotation
sizes and by trial and error (mostly error) ended up on that number.
"Samuel Benge" <sbe### [at] hotmail com> wrote in message
news:3F8### [at] hotmail com...
> I'm unschooled in the field of traditional trigonomentry usage.... where
> did you get the number 4.725?
>
> None wrote:
>
> > I think Reduce should simply be set to something like:
> >
> > #declare Reduce = X * tan(radians(4.725));
> >
>
>
> --
> Samuel Benge
>
> stb### [at] hotmail com
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Samuel Benge <sbe### [at] hotmail com> wrote in news:3F8588D8.6080308
@hotmail.com:
> I'm unschooled in the field of traditional trigonomentry usage.... where
> did you get the number 4.725?
That was simply the angle Patrick was rotating by, I pluged in the angle he
was using in his code into a standard trig. equation:
tan(angle) = Opposite/Adjacent.
Trigonometry is the measurement of triangles. A square can be broken down
into eight right angle triangles. In the eighth of a square, the Opposite
(O) and Adjacent (A) are the same. So if you change the angle while
keeping O or A the same, it will tell you how much the new A or O should
be.
Search the net for "trigonometry sin cos tan" for explanations of
trigonometry.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
None wrote:
> Trigonometry is the measurement of triangles. A square can be broken down
> into eight right angle triangles. In the eighth of a square, the Opposite
> (O) and Adjacent (A) are the same. So if you change the angle while
> keeping O or A the same, it will tell you how much the new A or O should
> be.
For efficiency, it's easier to just break a square into two triangles.
^_^ Also in a square you can't change the angles, or it ceases to be
a square. They will always be 45 and 90 degrees.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tim Cook <z99### [at] bellsouth net> wrote in
news:3f86c37d$1@news.povray.org:
> For efficiency, it's easier to just break a square into two triangles.
> ^_^ Also in a square you can't change the angles, or it ceases to be
> a square. They will always be 45 and 90 degrees.
Efficiency? In this case the square is centered at the origin, that's
where it's rotated from, so that's where the angle is, so we are dealing
with the eigtht, but we only care about _one_ triangle. If you want to
just use two triangles to solve this case, you're going to have to do
more math, which would be innefficient.
Of course a square's triangle angle can't change, that is exactly what we
are taking advantage of in this case. I said: the opposite and adjacent
sides are the same, so the angle is obviously fixed. In this case, if
the angle changes, we are determining by how much we need to adjust the
sides to keep the angle constant.
It sounds like you took my message completely out of context. I was
reffering to the problem at hand, the original question.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |