.....
Bernie> The di cussion over in vrml-behaviors is a general
Bernie> examination of the issues involved in behavior, without
Bernie> regard to the specifics of an implem>ntation (yet).
Okay -- but ignoring geometry when considering behavior is (IMHO)
naive. Lots of people talk in the user interface community about
separating the interface from the application (by analogy, separating
geometry from behavior). It's my opinion that doing so leads either to
very simple interfaces or very complex and poorly engineered
internals.
>> My opinion -- behaviors (unless we mean completely different
>> things by this word) have an awful lot to do with "data"
>> formats, such as VRML.
Bernie> I would *strongly* di
Hmmm. To use another analogy (all flawed, I know :-), object-ori>nted
>> Consider a clock.
Bernie> Yes, let's! :-)
>> Its behavior is an intrinsic part of it.
Bernie> What if the clock gets thrown across the room? Its
Oh, but throwing it across the room is only independent of the
Bernie> but I want the clock to be stopped, or to run backwards,
Stop time, or make time run backwards (just for the clock). Or define
Bernie> or to have the hands to spin randomly? The geometry is
Ditto.
Bernie> still the same, but the behavior is different. As soon as
I don't think you'll really get that kind of reuse, except for
>> Behavior<Geometry> clock = (minute_hand * Rotate(z_axis,
Bernie> That's what we've been referring to (on the
It _is_ decoupled, but to a limited extent. Consider a function:
Behavior<Geometry>
Now you can apply that behavior to any geometry, but only if that
Behavior and geometry can't be ignorant of each other.
Bernie> There are a number of approach>s to linking the two
Now try and reuse either of them....
Can you use the behavior on something that isn't a clock (or more
Can you get the geometry to do something else? Not without intimate
Bernie> For example, if I wanted to create a perpetually bouncing
Bernie> Sphere { radius 1 behavior
Bernie> That way the behaviour can be referenced by any number of
So for the clock, you'd do this (just pretend about the nod> types for
MinuteHand { behavior "http://somewhere.com/behaviors/minute-hand.beh"
What's the behavior doing in this case? Producing VRML corresponding
Bernie> Well, to have any kind of multi-participant interactive
RPC, perhaps. But consider all that WaxWeb has accomplished _without_
Bernie> I'd suggest taking a look at the di cussion we've had so
Bernie> http://sunee.uwaterloo.ca/~broehl/di trib.html
I'm reading them.
Bernie> We'd love to have you join the di cussion...
I've been trying -- mailed both [email protected] and
Brook
Bernie> of confusion.
programming is no good because it tri>s to muddle up data (geometry)
with behavior (behavior).
Bernie> behavior is, at that point, largely independent of its
Bernie> geometry. Or what if I want to use the clock's geometry,
geometry if you consider the clock a point mass. While that may be
acceptable if you are a person throwing a clock, it makes a big
difference to an ant throwing a clock, or to a person throwing an
automobile.
the clock so that it can do that.
Bernie> you lock them together, you're
Bernie> that geometries and behaviors can both be re-used.
behaviors that care nothing about the internal structure of the
object. For example, try using a behavior that rotates the hands of a
clock on a car. It doesn't make sense.
>> (time/millisecs_per_hour)*2*pi)) + (hour_hand * Rotate(z_axis,
>> (time/(millisecs_per_day/2))*2*pi));
Bernie> of one, too. Notice, though, that that same behavior
Bernie> would be useful for *any* clock, not just on> with a
Bernie> particular geometry. That's why de-coupling geometry and
Bernie> behavior is so powerful.
MakeClock(Behavior<Geometry> minute_hand,
Behavior<Geometry> hour_hand) {
return minute_hand * Rotate(z_axis, (time/millisecs_per_hour)*2*pi))
+ hour_hand * Rotate(z_axis, (time/(millisecs_per_day/2))*2*pi));
}
geometry is sufficiently structured that it would make sense.
Bernie> without combining them. For example, store the behaviour
Bernie> in a file and have a link (via a URI) from the clock
Bernie> object to that file.
particularly, isn't structured _Exactly_ the same as your clock (down
to using the same separators))? Not likely.
knowledge of the structure of the object.
Bernie> ball, I might do something like:
Bernie> "http://somehost.domain/~behaviors/bouncy-bouncy.beh" }
Bernie> objects.
a mom>nt):
}
HourHand { behavior "http://somewhere.com/behaviors/hour-hand.beh" }
to how the object should rotate? Then the
change? Then your behaviors are
(e.g., if your API d"scribes transformations and changing colors, you
can't make new geometry, like a flower blooming from a seed).
>> It sounds fairly baroque, in that it requires a great deal of
>> browsers (e.g., supporting RPC) and pres>nts many layers of
>> stuff....
Bernie> world, you'll have to bite that particular bullet in any
Bernie> case.
requiring RPC. (Not that WaxWeb is the be-all of collaborative VR, but
you get the idea).
Bernie> far; I'm not sure if it's archived, but I've gathered
Bernie> together a bunch of the ideas and written them up:
Bernie> http://sunee.uwaterloo.ca/~broehl/behav.html
[email protected], both of which bounced. What's the right address?